Another awfully sleepy week on Rails edge. Though by the time I had sent over the notes to Gregg Pollack and Jason Seifer of the awesome Rails Envy podcast, there has been some nice changes (that I'll be mentioning next week, but there's absolutely nothing stopping you from checking those out yourself).
In other interesting news, Pratik Naik (lifofifo), a long-time Rails contributor has been given commit rights to Rails. Congrats Pratik, well-deserved and it has been long overdue in my opinion! Pratik keeps an interesting blog at http://m.onkey.org/ (where he's not afraid to say "fuck" in his posts and his code) and hangs out an awful lot on #rubyonrails and #rails-contrib on IRC.
This week’s report covers changes from 25 Feb 2008 to 2 Mar 2008 (the day the corresponding Rails Envy podcast was recorded).
A bunch of Time core extension methods have been added. These are:
Time#end_of_quarter, which all return exactly what you expect them to return:
Time.now.end_of_week # => Sun Mar 09 00:00:00 0800 2008
Related changeset: http://dev.rubyonrails.org/changeset/8934
Date helpers now accept HTML options
ActionView's date helpers (such as
select_datetime) did not support any HTML options, unlike the other helpers (like
f.text_field(:name, :class => 'my_css_class', :size => 20)). This inconsistency has been fixed and you can now finally do:
<%= date_select 'user', 'birthday', :order => [:day], :class => 'my_css_class' %>
Related changeset: http://dev.rubyonrails.org/changeset/8968
No need for explicit respond_to for RJS templates
ActionController has been changed so that JS requests will automatically render action.js.rjs files without the need to specify an explicit
respond_to block. This means that your .rjs files work the same way as your .html.erb files - just put them in the right place and Rails will use it.
Related changeset: http://dev.rubyonrails.org/changeset/8956
- http://dev.rubyonrails.org/changeset/8937 - Prevent Rails from crashing when trying to deserialize an XML representation of a model named "Type" (using Hash#from_xml). Contributed by Juanjo Bazán and Isaac Feliu.
- http://dev.rubyonrails.org/changeset/8942 - Fix eager loading so that it doesn't pull in duplicate records in some cases. Contributed by Catfish.
As usual, let me know of any inaccuracies or any suggestions you may have in the comments!