Quirky date_select rendering in rails 3.2

34 views Asked by At

The following literal string:

<%= date_select :performance, :inizio_esercizio,  { :order => [:day, :month, :year], :default => Date.today.beginning_of_year}, {:class => "small-4 columns"} %>
<%= date_select :performance, :fine_esercizio,  { :order => [:day, :month, :year], :default => (Date.today - 1.months).at_end_of_month}, {:class => "small-4 columns"} %>

This renders, assuming to day is June 11, the menu for jun 11 and the menu for may 31, which is as expected.

However, removing the first statement and leaving only:

<%= date_select :performance, :fine_esercizio,  { :order => [:day, :month, :year], :default => (Date.today - 1.months).at_end_of_month}, {:class => "small-4 columns"} %>

This returns a menu of June 11.

1

There are 1 answers

0
Jerome On

It seems like it was a browser caching error, which got resolved by restarting server and opening a new tab. Firefox 38 on OSX 10.6.8