aboutsummaryrefslogtreecommitdiffstats
path: root/railties/guides/source/3_1_release_notes.textile
diff options
context:
space:
mode:
authorHendy Tanata <htanata@gmail.com>2011-08-14 12:30:37 +0800
committerHendy Tanata <htanata@gmail.com>2011-08-14 13:08:50 +0800
commite10b288bc64b8b8160bf880ca2343469558803f9 (patch)
treea2a79082005aeb229aa6fc766305d040aa2d99d3 /railties/guides/source/3_1_release_notes.textile
parent4d525b8c032b23a21a4c494755ce70b187e102ce (diff)
downloadrails-e10b288bc64b8b8160bf880ca2343469558803f9.tar.gz
rails-e10b288bc64b8b8160bf880ca2343469558803f9.tar.bz2
rails-e10b288bc64b8b8160bf880ca2343469558803f9.zip
Use fixed-width font where necessary.
Diffstat (limited to 'railties/guides/source/3_1_release_notes.textile')
-rw-r--r--railties/guides/source/3_1_release_notes.textile24
1 files changed, 12 insertions, 12 deletions
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 <tt>config.filter_parameters</tt> 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 <tt>ActionController::ParamsWrapper</tt> 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 <tt>ActionController::Base.wrap_parameters</tt> in <tt>config/initializer/wrap_parameters.rb</tt>.
-* Added <tt>config.action_controller.include_all_helpers</tt>. By default <tt>helper :all</tt> is done in <tt>ActionController::Base</tt>, 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 <tt>config.action_controller.include_all_helpers</tt>. By default <tt>helper :all</tt> is done in <tt>ActionController::Base</tt>, 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 <tt>:multipart => true</tt> 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:
<plain>
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 <tt>FormHelper#form_for</tt> to specify the :method as a direct option instead of through the :html hash. <tt>form_for(==@==post, remote: true, method: :delete)</tt> instead of <tt>form_for(==@==post, remote: true, html: { method: :delete })</tt>.
+* Allows <tt>FormHelper#form_for</tt> to specify the +:method+ as a direct option instead of through the +:html+ hash. <tt>form_for(==@==post, remote: true, method: :delete)</tt> instead of <tt>form_for(==@==post, remote: true, html: { method: :delete })</tt>.
* Provided <tt>JavaScriptHelper#j()</tt> as an alias for <tt>JavaScriptHelper#escape_javascript()</tt>. This supersedes the <tt>Object#j()</tt> 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
* <tt>ActiveRecord::Associations::AssociationProxy</tt> 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 <tt>:dependent</tt> option on <tt>has_many :through</tt> associations. For historical and practical reasons, +:delete_all+ is the default deletion strategy employed by <tt>association.delete(*records)</tt>, 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
</ruby>
-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:
<ruby>
@@ -366,7 +366,7 @@ end
* Calling <tt>ActiveRecord::Base#clone</tt> will result in a shallow copy of the record, including copying the frozen state. No callbacks will be called.
-* Calling <tt>ActiveRecord::Base#dup</tt> 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 <tt>new_record?</tt>, have a nil id field, and is saveable.
+* Calling <tt>ActiveRecord::Base#dup</tt> 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 <tt>new_record?</tt>, have a +nil+ id field, and is saveable.
h3. Active Model