instance method store_accessor_for

Ruby on Rails 8.0.4

Since v4.1.16 Private

Available in: v4.1.16 v4.2.9 v5.2.8.1 v6.0.6 v6.1.7.10 v7.0.10 v7.1.6 v7.2.3 v8.0.4 v8.1.2

Signature

store_accessor_for(store_attribute)

No documentation comment.

Parameters

store_attribute req
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

Type at least 2 characters to search.

↑↓ navigate · open · esc close