Joe MooreJoe Moore
Standup 02/28/2007
edit Posted by Joe Moore on Wednesday February 28, 2007 at 04:36PM

Interesting Things

  • JSON: the consensus seems to be that ActiveRecord's to_json method is buggy, and that people wishing to transform their ActiveRecords into JSON should use the Fast JSON gem.
  • Here's a Rails gotcha: if you are performing a form POST from a Rails template, there is a risk that any query-parameters in your URL will "stomp" parameters with the same key in your form. In the following code example, id = 1 will be sent to your app:
<code>
    # id = 1 will be sent to the app below
    url: http://railsapp.com/person/play_with&id=1

    --- in play_with.rhtml: 
    # id = 9 will NOT be sent to the app
    # because of the `&id=1` in the URL
    form_for :person, @person, 
             :url => {:action => :something, :id => 99} do |form|
       # blah blah blah...
    end
</code>

Total Stand-up Meeting Time: 13:00 minutes