Class: ActiveRecord::ConnectionAdapters::MysqlAdapter

Inherits:
AbstractAdapter
  • Object
show all
Defined in:
lib/ar-column-as.rb

Instance Method Summary collapse

Instance Method Details

#month_calc(column) ⇒ Object



18
19
20
# File 'lib/ar-column-as.rb', line 18

def month_calc(column)
  "MONTH(#{column.to_s})"
end

#year_calc(column) ⇒ Object



14
15
16
# File 'lib/ar-column-as.rb', line 14

def year_calc(column)
  "YEAR(#{column.to_s})"
end