Sha256: fa17e28047e9be1ce70d92ea53e9e88505defce87fc6759837477f8d1e742bc2
Contents?: true
Size: 571 Bytes
Versions: 9
Compression:
Stored size: 571 Bytes
Contents
module ActsAsScrubbable module Scrubbable def scrubbable? false end def acts_as_scrubbable(*scrubbable_fields) class_attribute :scrubbable_fields self.scrubbable_fields = {} scrubbable_fields.each do |_field| if _field.is_a? Hash self.scrubbable_fields[_field.keys.first] = _field.values.first else self.scrubbable_fields[_field] = _field end end class_eval do def self.scrubbable? true end end include Scrub end end end
Version data entries
9 entries across 9 versions & 1 rubygems