Flex on Rails book source code updated for Rails 2.3.2
Sunday, May 3, 2009
- In Rails 2.3.2 the file containing the application controller class must be renamed from application.rb to application_controller.rb.
- Another change introduce since the new rack middleware stack is that adding _method=put to the url isn't recognized by rails in the case of a post. However it's still recognized for the delete, so I am not sure what's going on and if the Rails guys will reinstate the _method= in the near future. Fortunately Rails recognizes the X_HTTP_METHOD_OVERRIDE request header. So for updates we set this header in Flex. Now Flex doesn't set the headers if the body of the message is empty like for delete, so we still use the _method=delete for deletes. It would be nice to be able to set this in a consistent manner for both deletes and updates.
- On chapter 04 on testing with Fluint we moved to using fluint 1.1.1, and no changes was require for this.
- On chapter 20 Server Push with Juggernaut I updated using the latest plugin downloaded from github and no more the code from rubyforge and updated gem version for eventmachine to 0.12.6 and the json gem to 1.1.4. So installing the plugin is now done with the following command:
./script/plugin install git://github.com/maccman/juggernaut_plugin.git
If you find any other issues with Rails 2.3.2. send me an email or leave a comment on this blog post. Thanks to all the readers that submitted comments so far.
Enjoy!
Daniel
Labels: book, Flex on Rails
