instance method only_columns

Ruby on Rails 8.1.2

Since v8.1.2

Signature

only_columns()

The list of columns names the model should allow. Only columns are used to define attribute accessors, and are referenced in SQL queries.

Source
# File activerecord/lib/active_record/model_schema.rb, line 340
      def only_columns
        @only_columns || superclass.only_columns
      end

Defined in activerecord/lib/active_record/model_schema.rb line 340 · View on GitHub · Improve this page · Find usages on GitHub

Defined in ActiveRecord::ModelSchema::ClassMethods

Type at least 2 characters to search.

Use the arrow keys to navigate results, Enter to open one, Escape to close.

Keyboard shortcuts

/
Focus search
⌘K / Ctrl-K
Command palette
?
This help
Esc
Close