From e10b288bc64b8b8160bf880ca2343469558803f9 Mon Sep 17 00:00:00 2001 From: Hendy Tanata Date: Sun, 14 Aug 2011 12:30:37 +0800 Subject: Use fixed-width font where necessary. --- railties/guides/source/3_1_release_notes.textile | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'railties/guides/source/3_1_release_notes.textile') diff --git a/railties/guides/source/3_1_release_notes.textile b/railties/guides/source/3_1_release_notes.textile index 4da3aaaf7a..4db6b2e8e0 100644 --- a/railties/guides/source/3_1_release_notes.textile +++ b/railties/guides/source/3_1_release_notes.textile @@ -81,13 +81,13 @@ h3. Railties * jQuery and Prototype are no longer vendored and is provided from now on by the jquery-rails and prototype-rails gems. -* The application generator accepts an option -j which can be an arbitrary string. If passed "foo", the gem "foo-rails" is added to the Gemfile, and the application JavaScript manifest requires "foo" and "foo_ujs". Currently only "prototype-rails" and "jquery-rails" exist and provide those files via the asset pipeline. +* The application generator accepts an option +-j+ which can be an arbitrary string. If passed "foo", the gem "foo-rails" is added to the +Gemfile+, and the application JavaScript manifest requires "foo" and "foo_ujs". Currently only "prototype-rails" and "jquery-rails" exist and provide those files via the asset pipeline. -* Generating an application or a plugin runs +bundle install+ unless --skip-gemfile or --skip-bundle is specified. +* Generating an application or a plugin runs +bundle install+ unless +--skip-gemfile+ or +--skip-bundle+ is specified. -* The controller and resource generators will now automatically produce asset stubs (this can be turned off with --skip-assets). These stubs will use CoffeeScript and Sass, if those libraries are available. +* The controller and resource generators will now automatically produce asset stubs (this can be turned off with +--skip-assets+). These stubs will use CoffeeScript and Sass, if those libraries are available. -* Scaffold and app generators use the Ruby 1.9 style hash when running on Ruby 1.9. To generate old style hash, --old-style-hash can be passed. +* Scaffold and app generators use the Ruby 1.9 style hash when running on Ruby 1.9. To generate old style hash, +--old-style-hash+ can be passed. * Scaffold controller generator creates format block for JSON instead of XML. @@ -109,15 +109,15 @@ h4. Action Controller * A warning is given out if the CSRF token authenticity cannot be verified. -* Specify +force_ssl+ in a controller to force the browser to transfer data via HTTPS protocol on that particular controller. To limit to specific actions, :only or :except can be used. +* Specify +force_ssl+ in a controller to force the browser to transfer data via HTTPS protocol on that particular controller. To limit to specific actions, +:only+ or +:except+ can be used. * Sensitive query string parameters specified in config.filter_parameters will now be filtered out from the request paths in the log. -* URL parameters which return nil for +to_param+ are now removed from the query string. +* URL parameters which return +nil+ for +to_param+ are now removed from the query string. * Added ActionController::ParamsWrapper to wrap parameters into a nested hash, and will be turned on for JSON request in new applications by default. This can be customized by setting ActionController::Base.wrap_parameters in config/initializer/wrap_parameters.rb. -* Added config.action_controller.include_all_helpers. By default helper :all is done in ActionController::Base, which includes all the helpers by default. Setting +include_all_helpers+ to false will result in including only application_helper and the helper corresponding to controller (like foo_helper for foo_controller). +* Added config.action_controller.include_all_helpers. By default helper :all is done in ActionController::Base, which includes all the helpers by default. Setting +include_all_helpers+ to +false+ will result in including only application_helper and the helper corresponding to controller (like foo_helper for foo_controller). * +url_for+ and named url helpers now accept +:subdomain+ and +:domain+ as options. @@ -200,7 +200,7 @@ h4. Action View * +file_field+ automatically adds :multipart => true to the enclosing form. -* Added a convenience idiom to generate HTML5 data-* attributes in tag helpers from a :data hash of options: +* Added a convenience idiom to generate HTML5 data-* attributes in tag helpers from a +:data+ hash of options: tag("div", :data => {:name => 'Stephen', :city_state => %w(Chicago IL)}) @@ -219,7 +219,7 @@ Keys are dasherized. Values are JSON-encoded, except for strings and symbols. * The submit form helper does not generate an id "object_name_id" anymore. -* Allows FormHelper#form_for to specify the :method as a direct option instead of through the :html hash. form_for(==@==post, remote: true, method: :delete) instead of form_for(==@==post, remote: true, html: { method: :delete }). +* Allows FormHelper#form_for to specify the +:method+ as a direct option instead of through the +:html+ hash. form_for(==@==post, remote: true, method: :delete) instead of form_for(==@==post, remote: true, html: { method: :delete }). * Provided JavaScriptHelper#j() as an alias for JavaScriptHelper#escape_javascript(). This supersedes the Object#j() method that the JSON gem adds within templates using the JavaScriptHelper. @@ -284,7 +284,7 @@ People.limit(1).offset(1).count # => 'SELECT COUNT(*) FROM people LIMIT 1 OFFSET * ActiveRecord::Associations::AssociationProxy has been split. There is now an +Association+ class (and subclasses) which are responsible for operating on associations, and then a separate, thin wrapper called +CollectionProxy+, which proxies collection associations. This prevents namespace pollution, separates concerns, and will allow further refactorings. -* Singular associations (has_one, belongs_to) no longer have a proxy and simply returns the associated record or nil. This means that you should not use undocumented methods such as bob.mother.create - use bob.create_mother instead. +* Singular associations (+has_one+, +belongs_to+) no longer have a proxy and simply returns the associated record or +nil+. This means that you should not use undocumented methods such as +bob.mother.create+ - use +bob.create_mother+ instead. * Support the :dependent option on has_many :through associations. For historical and practical reasons, +:delete_all+ is the default deletion strategy employed by association.delete(*records), despite the fact that the default strategy is +:nullify+ for regular has_many. Also, this only works at all if the source reflection is a belongs_to. For other situations, you should directly modify the through association. @@ -341,7 +341,7 @@ has_many :things, :conditions => 'foo = #{bar}' # before has_many :things, :conditions => proc { "foo = #{bar}" } # after -Inside the proc, 'self' is the object which is the owner of the association, unless you are eager loading the association, in which case 'self' is the class which the association is within. +Inside the proc, +self+ is the object which is the owner of the association, unless you are eager loading the association, in which case +self+ is the class which the association is within. You can have any "normal" conditions inside the proc, so the following will work too: @@ -366,7 +366,7 @@ end * Calling ActiveRecord::Base#clone will result in a shallow copy of the record, including copying the frozen state. No callbacks will be called. -* Calling ActiveRecord::Base#dup will duplicate the record, including calling after initialize hooks. Frozen state will not be copied, and all associations will be cleared. A duped record will return true for new_record?, have a nil id field, and is saveable. +* Calling ActiveRecord::Base#dup will duplicate the record, including calling after initialize hooks. Frozen state will not be copied, and all associations will be cleared. A duped record will return +true+ for new_record?, have a +nil+ id field, and is saveable. h3. Active Model -- cgit v1.2.3