config/initializers/mongoid_extension.rb
# Set fields that should be encrypted
Set fields that should be encrypted
Set fields that should be encrypted
def encryptable(*fields)
        fields = fields.is_a?(Enumerable) ? fields : [fields]
        fields.each do |field_name|
          define_setter_and_getter(field_name)
        end
      end
def encryptable ( * fields ) fields = fields . is_a? ( Enumerable ) ? fields : [ fields ] fields . each do | field_name | define_setter_and_getter ( field_name ) end end
Set fields that should be encrypted
Set fields that should be encrypted
# puts "fields #{fields}"
fields
<not_specific>