instance method
content_columns
Ruby on Rails 5.2.8.1
Since v3.2.22.5Signature
content_columns()
Returns an array of column objects where the primary id, all columns ending in “_id” or “_count”, and columns used for single table inheritance have been removed.
Source
# File activerecord/lib/active_record/model_schema.rb, line 393
def content_columns
@content_columns ||= columns.reject do |c|
c.name == primary_key ||
c.name == inheritance_column ||
c.name.end_with?("_id") ||
c.name.end_with?("_count")
end
end
Defined in activerecord/lib/active_record/model_schema.rb line 393
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveRecord::ModelSchema::ClassMethods