Monday, July 20, 2009
Rails 2.3.3: Touching, faster JSON, bug fixes
Posted by David
We’ve released Ruby on Rails version 2.3.3. This release fixes a lot of bugs and introduces a handful of new features.
touch is a convenient method to update a record’s timestamp and nothing else. This is extracted from apps whose models “touch” others when they change, such as a comment updating the parent.replies_changed_at timestamp after save and destroy. Timestamping an entire has_many association makes it easy to build a key for fragment caching that covers changes to the parent object and any of its children. This pattern is wrapped up as
belongs_to :parent, :touch => :replies_changed_at. When the child changes,
parent.replies_changed_at is touched.
:touch => true is defaults to
:touch => :updated_at.
:primary_key option for
belongs_to for broader support of legacy schemas and those using a separate UUID primary key:
belongs_to :employee, :primary_key => 'SSN', :foreign_key => 'EMPID' changeset
- Add :concat option to asset tag helpers to force concatenation. changeset
- Restore backwards compatibility for AR::Base#to_xml. changeset
- Move from BlueCloth to Markdown for the markdown helper. Users using BlueCloth to provide their markdown functionality should upgrade to version 1.0.1 or 2.0.5 in order to restore compatibility.
Notable Bug Fixes
- Fix errors caused by class-reloading with streaming responses in development mode.
- Several fixes to the gem bundling, unpacking and installing system.
- Make text_area_tag escape contents by default.
- Make filter_parameters work correctly with array parameters.
- Thread-safety fixes for postgresql string quoting.
- Performance fixes for large response bodies.