Method: ActiveRecord::Store::ClassMethods#store

Defined in:
activerecord/lib/active_record/store.rb

#store(store_attribute, options = {}) ⇒ Object



106
107
108
109
110
# File 'activerecord/lib/active_record/store.rb', line 106

def store(store_attribute, options = {})
  coder = build_column_serializer(store_attribute, options[:coder], Object, options[:yaml])
  serialize store_attribute, coder: IndifferentCoder.new(store_attribute, coder)
  store_accessor(store_attribute, options[:accessors], **options.slice(:prefix, :suffix)) if options.has_key? :accessors
end