From bb4cf38fa63ea891f0d13f6a43ada692787e2cf3 Mon Sep 17 00:00:00 2001 From: Xavier Noria Date: Mon, 5 Apr 2010 12:23:42 -0700 Subject: minimal update to 3.0 release notes, will link to CHANGELOGS ultimately --- railties/guides/source/3_0_release_notes.textile | 26 ++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/railties/guides/source/3_0_release_notes.textile b/railties/guides/source/3_0_release_notes.textile index cc84129b35..804ff2a96c 100644 --- a/railties/guides/source/3_0_release_notes.textile +++ b/railties/guides/source/3_0_release_notes.textile @@ -302,6 +302,8 @@ More Information: h4. Action View +h5. Unobtrusive JavaScript + Major re-write was done in the Action View helpers, implementing Unobtrusive JavaScript (UJS) hooks and removing the old inline AJAX commands. This enables Rails to use any compliant UJS driver to implement the UJS hooks in the helpers. What this means is that all previous remote_ helpers have been removed from Rails core and put into the "Prototype Legacy Helper":http://github.com/rails/prototype_legacy_helper. To get UJS hooks into your HTML, you now pass :remote => true instead. For example: @@ -316,6 +318,22 @@ Produces:
+h5. Helpers with Blocks + +Helpers like +form_for+ or +div_for+ that insert content from a block use +<%=+ now: + + +<%= form_for @post do |f| %> + ... +<% end %> + + +Your own helpers of that kind are expected to return a string, rather than appending to the output buffer by hand. + +Helpers that do something else, like +cache+ or +content_for+, are not affected by this change, they need +<%+ as before. + +h5. Other Changes + * You no longer need to call h(string) to escape HTML output, it is on by default in all view templates. If you want the unescaped string, call raw(string). * Helpers now output HTML 5 by default. * Form label helper now pulls values from I18n with a single value, so f.label :name will pull the :name translation. @@ -382,6 +400,13 @@ class Person < ActiveRecord::Base end +There's also support for introspection: + + +User.validators +User.validators_on(:login) + + More Information: * "Sexy Validation in Rails 3":http://thelucid.com/2010/01/08/sexy-validation-in-edge-rails-rails-3/ * "Rails 3 Validations Explained":http://lindsaar.net/2010/1/31/validates_rails_3_awesome_is_true @@ -512,6 +537,7 @@ These are the main changes in Active Support: * MissingSourceFile exists as a constant but it is now just equals to LoadError. * Added Class#class_attribute, to be able to declare a class-level attribute whose value is inheritable and overwritable by subclasses. * Finally removed +DeprecatedCallbacks+ in ActiveRecord::Associations. +* +Object#metaclass+ is now +Kernel#singleton_class+ to match Ruby. The following methods have been removed because they are now available in Ruby 1.8.7 and 1.9. -- cgit v1.2.3