instance method
store_accessor_for
Ruby on Rails 8.0.4
Since v4.1.16 PrivateSignature
store_accessor_for(store_attribute)
No documentation comment.
Parameters
-
store_attributereq
Source
# File activerecord/lib/active_record/store.rb, line 219
def store_accessor_for(store_attribute)
type_for_attribute(store_attribute).tap do |type|
unless type.respond_to?(:accessor)
raise ConfigurationError, "the column '#{store_attribute}' has not been configured as a store. Please make sure the column is declared serializable via 'ActiveRecord.store' or, if your database supports it, use a structured column type like hstore or json."
end
end.accessor
end
Defined in activerecord/lib/active_record/store.rb line 219
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveRecord::Store