instance method column_for

Ruby on Rails 3.1.12

Since v3.1.12 Last seen in v3.1.12 Private

Signature

column_for(table_name, column_name)

No documentation comment.

Parameters

table_name req
column_name req
Source
# File activerecord/lib/active_record/connection_adapters/mysql2_adapter.rb, line 720
        def column_for(table_name, column_name)
          unless column = columns(table_name).find { |c| c.name == column_name.to_s }
            raise "No such column: #{table_name}.#{column_name}"
          end
          column
        end

Defined in activerecord/lib/active_record/connection_adapters/mysql2_adapter.rb line 720 · View on GitHub · Improve this page · Find usages on GitHub

Defined in ActiveRecord::ConnectionAdapters::Mysql2Adapter

Type at least 2 characters to search.

↑↓ navigate · open · esc close