Method: ActiveRecord::Base.get_column_name
- Defined in:
- lib/core_ext/active_record.rb
.get_column_name(col_or_sym) ⇒ Object
get column name from column object or symbol
103 104 105 106 107 108 109 110 |
# File 'lib/core_ext/active_record.rb', line 103 def self.get_column_name(col_or_sym) case col_or_sym when String, Symbol col_or_sym else col_or_sym.name end end |