Rails 1.2 Features
September 5th, 2006
Bob Silva has posted a list of features coming to Rails 1.2 which may hvae a release candidate out in the next few weeks. A few of my favorite that Bob listed are below:
- Access nested attributes in RJS templates. Now you can use syntax like this:
page[:foo][:style][:color]which will generate javascript like:$('foo').style.color - Now you can access the locals hash directly. In your partials, you can check if a local varialbe was passed in by doing:
if locals[:local_var] then... - The default for foreign_keys will be the association name, rather than the class name. So if you specify a
:class_namewith no:foreign_keyon your belongs_to associations, it will throw a Deprecation warning. - In the testing department,
assert_taghas been deprecated in favor of the newassert_selectfamily of assertions.
Check out Bob’s article for the rest of the list. Also, if you are interested in the prototype updates, you can read Justin Palmer’s first and second entries detailing the changes. They look pretty interesting.

Leave a Reply