Sha256: 1aacedfd75a62525a101cc31e14f79681252581afcc95440924edfb0073882da
Contents?: true
Size: 340 Bytes
Versions: 2
Compression:
Stored size: 340 Bytes
Contents
module RescueFromDuplicate class Rescuer attr_reader :attributes, :options def initialize(attribute, options) @attributes = [attribute] @columns = [attribute, *Array(options[:scope])].map(&:to_s) @options = options end def matches?(columns) @columns == columns.map(&:to_s).sort end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
activerecord-rescue_from_duplicate-0.0.5 | lib/rescue_from_duplicate/rescuer.rb |
activerecord-rescue_from_duplicate-0.0.4 | lib/rescue_from_duplicate/rescuer.rb |