lib/happy-helpers/helpers/forms.rb in happy-helpers-0.1.0.pre.4 vs lib/happy-helpers/helpers/forms.rb in happy-helpers-0.1.0.pre.5
- old
+ new
@@ -22,11 +22,11 @@
def date_time_select_tag(name, value = nil, options = {})
options = {
:years => (Time.now.year - 10)..(Time.now.year + 10),
:months => 1..12,
:days => 1..31,
- :month_formatter => ->(i) { translate("date.month_names")[i] },
- :day_formatter => ->(i) { "#{i}." }
+ :month_formatter => lambda { |i| translate("date.month_names")[i] },
+ :day_formatter => lambda { |i| "#{i}." }
}.merge(options)
value ||= Time.now
year_select = html_tag(:select, :name => "#{name}[year]") do
options[:years].map do |year|