aboutsummaryrefslogtreecommitdiffstats
path: root/railties/guides/source
diff options
context:
space:
mode:
authorXavier Noria <fxn@hashref.com>2010-08-26 01:39:16 +0200
committerXavier Noria <fxn@hashref.com>2010-08-26 01:39:16 +0200
commitfa8e17b5c274d80dc161c48b4b8ca67809593620 (patch)
tree32f2ee690a2f96ec1ee613499929b724cafb6789 /railties/guides/source
parentd2f55e7eee3f82a9a8cc53a2c48294685d75b15e (diff)
parentee7507b38e14c39dd21aef581cffbe5dc3bd273b (diff)
downloadrails-fa8e17b5c274d80dc161c48b4b8ca67809593620.tar.gz
rails-fa8e17b5c274d80dc161c48b4b8ca67809593620.tar.bz2
rails-fa8e17b5c274d80dc161c48b4b8ca67809593620.zip
Merge remote branch 'docrails/master'
Diffstat (limited to 'railties/guides/source')
-rw-r--r--railties/guides/source/3_0_release_notes.textile28
-rw-r--r--railties/guides/source/action_view_overview.textile2
-rw-r--r--railties/guides/source/getting_started.textile8
-rw-r--r--railties/guides/source/layouts_and_rendering.textile2
4 files changed, 20 insertions, 20 deletions
diff --git a/railties/guides/source/3_0_release_notes.textile b/railties/guides/source/3_0_release_notes.textile
index 14da650e83..464fd66b7b 100644
--- a/railties/guides/source/3_0_release_notes.textile
+++ b/railties/guides/source/3_0_release_notes.textile
@@ -201,9 +201,9 @@ Finally a couple of enhancements were added to the rake tasks:
Railties now deprecates:
-* <tt>RAILS_ROOT</tt> in favour of <tt>Rails.root</tt>,
-* <tt>RAILS_ENV</tt> in favour of <tt>Rails.env</tt>, and
-* <tt>RAILS_DEFAULT_LOGGER</tt> in favour of <tt>Rails.logger</tt>.
+* <tt>RAILS_ROOT</tt> in favor of <tt>Rails.root</tt>,
+* <tt>RAILS_ENV</tt> in favor of <tt>Rails.env</tt>, and
+* <tt>RAILS_DEFAULT_LOGGER</tt> in favor of <tt>Rails.logger</tt>.
<tt>PLUGIN/rails/tasks</tt>, and <tt>PLUGIN/tasks</tt> are no longer loaded all tasks now must be in <tt>PLUGIN/lib/tasks</tt>.
@@ -241,7 +241,7 @@ h4. Action Controller
Deprecations:
-* <tt>filter_parameter_logging</tt> is deprecated in favour of <tt>config.filter_parameters << :password</tt>.
+* <tt>filter_parameter_logging</tt> is deprecated in favor of <tt>config.filter_parameters << :password</tt>.
More Information:
* "Render Options in Rails 3":http://www.engineyard.com/blog/2010/render-options-in-rails-3/
@@ -363,8 +363,8 @@ Validations have been moved from Active Record into Active Model, providing an i
* The +validates+ method has the following options:
* <tt>:acceptance => Boolean</tt>.
* <tt>:confirmation => Boolean</tt>.
- * <tt>:exclusion => { :in => Ennumerable }</tt>.
- * <tt>:inclusion => { :in => Ennumerable }</tt>.
+ * <tt>:exclusion => { :in => Enumerable }</tt>.
+ * <tt>:inclusion => { :in => Enumerable }</tt>.
* <tt>:format => { :with => Regexp, :on => :create }</tt>.
* <tt>:length => { :maximum => Fixnum }</tt>.
* <tt>:numericality => Boolean</tt>.
@@ -452,7 +452,7 @@ h4. Patches and Deprecations
Additionally, many fixes in the Active Record branch:
-* SQLite 2 support has been dropped in favour of SQLite 3.
+* SQLite 2 support has been dropped in favor of SQLite 3.
* MySQL support for column order.
* PostgreSQL adapter has had its +TIME ZONE+ support fixed so it no longer inserts incorrect values.
* Support multiple schemas in table names for PostgreSQL.
@@ -464,11 +464,11 @@ As well as the following deprecations:
* +named_scope+ in an Active Record class is deprecated and has been renamed to just +scope+.
* In +scope+ methods, you should move to using the relation methods, instead of a <tt>:conditions => {}</tt> finder method, for example <tt>scope :since, lambda {|time| where("created_at > ?", time) }</tt>.
-* <tt>save(false)</tt> is deprecated, in favour of <tt>save(:validate => false)</tt>.
+* <tt>save(false)</tt> is deprecated, in favor of <tt>save(:validate => false)</tt>.
* I18n error messages for ActiveRecord should be changed from :en.activerecord.errors.template to <tt>:en.errors.template</tt>.
-* <tt>model.errors.on</tt> is deprecated in favour of <tt>model.errors[]</tt>
+* <tt>model.errors.on</tt> is deprecated in favor of <tt>model.errors[]</tt>
* validates_presence_of => validates... :presence => true
-* <tt>ActiveRecord::Base.colorize_logging</tt> and <tt>config.active_record.colorize_logging</tt> are deprecated in favour of <tt>Rails::LogSubscriber.colorize_logging</tt> or <tt>config.colorize_logging</tt>
+* <tt>ActiveRecord::Base.colorize_logging</tt> and <tt>config.active_record.colorize_logging</tt> are deprecated in favor of <tt>Rails::LogSubscriber.colorize_logging</tt> or <tt>config.colorize_logging</tt>
NOTE: While an implementation of State Machine has been in Active Record edge for some months now, it has been removed from the Rails 3.0 release.
@@ -491,7 +491,7 @@ Active Resource was also extracted out to Active Model allowing you to use Activ
* Renamed <tt>SchemaDefinition</tt> to <tt>Schema</tt> and <tt>define_schema</tt> to <tt>schema</tt>.
* Use the <tt>format</tt> of Active Resources rather than the <tt>content-type</tt> of remote errors to load errors.
* Use <tt>instance_eval</tt> for schema block.
-* Fix <tt>ActiveResource::ConnectionError#to_s</tt> when +@response+ does not respond to #code or #message, handles Ruby 1.9 compat.
+* Fix <tt>ActiveResource::ConnectionError#to_s</tt> when +@response+ does not respond to #code or #message, handles Ruby 1.9 compatibility.
* Add support for errors in JSON format.
* Ensure <tt>load</tt> works with numeric arrays.
* Recognizes a 410 response from remote resource as the resource has been deleted.
@@ -500,7 +500,7 @@ Active Resource was also extracted out to Active Model allowing you to use Activ
Deprecations:
-* <tt>save(false)</tt> is deprecated, in favour of <tt>save(:validate => false)</tt>.
+* <tt>save(false)</tt> is deprecated, in favor of <tt>save(:validate => false)</tt>.
* Ruby 1.9.2: <tt>URI.parse</tt> and <tt>.decode</tt> are deprecated and are no longer used in the library.
@@ -551,7 +551,7 @@ The following methods have been removed because they are now available in Ruby 1
* <tt>Object#instance_variable_defined?</tt>
* <tt>Enumerable#none?</tt>
-The security patch for REXML remains in Active Support because early patchlevels of Ruby 1.8.7 still need it. Active Support knows whether it has to apply it or not.
+The security patch for REXML remains in Active Support because early patch-levels of Ruby 1.8.7 still need it. Active Support knows whether it has to apply it or not.
The following methods have been removed because they are no longer used in the framework:
@@ -579,7 +579,7 @@ Action Mailer has been given a new API with TMail being replaced out with the ne
Deprecations:
-* <tt>:charset</tt>, <tt>:content_type</tt>, <tt>:mime_version</tt>, <tt>:implicit_parts_order</tt> are all deprecated in favour of <tt>ActionMailer.default :key => value</tt> style declarations.
+* <tt>:charset</tt>, <tt>:content_type</tt>, <tt>:mime_version</tt>, <tt>:implicit_parts_order</tt> are all deprecated in favor of <tt>ActionMailer.default :key => value</tt> style declarations.
* Mailer dynamic <tt>create_method_name</tt> and <tt>deliver_method_name</tt> are deprecated, just call <tt>method_name</tt> which now returns a <tt>Mail::Message</tt> object.
* <tt>ActionMailer.deliver(message)</tt> is deprecated, just call <tt>message.deliver</tt>.
* <tt>template_root</tt> is deprecated, pass options to a render call inside a proc from the <tt>format.mime_type</tt> method inside the <tt>mail</tt> generation block
diff --git a/railties/guides/source/action_view_overview.textile b/railties/guides/source/action_view_overview.textile
index e242cdaf73..cd3c0a1b7b 100644
--- a/railties/guides/source/action_view_overview.textile
+++ b/railties/guides/source/action_view_overview.textile
@@ -1380,7 +1380,7 @@ page.insert_html :bottom, 'my_list', '<li>Last item</li>'
h5. literal
-Returns an object whose to_json evaluates to the code provided. Use this to pass a literal JavaScript expression as an argument to another JavaScriptGenerator method.
+Returns an object whose as_json evaluates to the code provided. Use this to pass a literal JavaScript expression as an argument to another JavaScriptGenerator method.
h5. redirect_to
diff --git a/railties/guides/source/getting_started.textile b/railties/guides/source/getting_started.textile
index c292daa915..4823876f19 100644
--- a/railties/guides/source/getting_started.textile
+++ b/railties/guides/source/getting_started.textile
@@ -235,7 +235,7 @@ If you choose to use MySQL instead of the shipped Sqlite3 database, your +config
<yaml>
development:
- adapter: mysql
+ adapter: mysql2
encoding: utf8
database: blog_development
pool: 5
@@ -1017,7 +1017,7 @@ Once we have made the new comment, we send the user back to the original post us
Now you can add posts and comments to your blog and have them show up in the right places.
-h3. Refactorization
+h3. Refactoring
Now that we have Posts and Comments working, if we take a look at the +app/views/posts/show.html.erb+ template, it's getting long and awkward. We can use partials to clean this up.
@@ -1141,7 +1141,7 @@ Then you make the +app/views/posts/show.html.erb+ look like the following:
<%= link_to 'Back to Posts', posts_path %> |
</erb>
-The second render just defines the partial template we want to render, <tt>comments/form</tt>, Rails is smart enough to spot the forward slash in that string and realise that you want to render the <tt>_form.html.erb</tt> file in the <tt>app/views/comments</tt> directory.
+The second render just defines the partial template we want to render, <tt>comments/form</tt>, Rails is smart enough to spot the forward slash in that string and realize that you want to render the <tt>_form.html.erb</tt> file in the <tt>app/views/comments</tt> directory.
The +@post+ object is available to any partials rendered in the view because we defined it as an instance variable.
@@ -1279,7 +1279,7 @@ Again, run the migration to create the database table:
$ rake db:migrate
</shell>
-Next, edit the +post.rb+ file to create the other side of the association, and to tell Rails (via the +accepts_nested_attributes+ macro) that you intend to edit tags via posts:
+Next, edit the +post.rb+ file to create the other side of the association, and to tell Rails (via the +accepts_nested_attributes_for+ macro) that you intend to edit tags via posts:
<ruby>
class Post < ActiveRecord::Base
diff --git a/railties/guides/source/layouts_and_rendering.textile b/railties/guides/source/layouts_and_rendering.textile
index fe5b4c8773..1bef4d2145 100644
--- a/railties/guides/source/layouts_and_rendering.textile
+++ b/railties/guides/source/layouts_and_rendering.textile
@@ -285,7 +285,7 @@ JSON is a javascript data format used by many AJAX libraries. Rails has built-in
render :json => @product
</ruby>
-TIP: You don't need to call +to_json+ on the object that you want to render. If you use the +:json+ option, +render+ will automatically call +to_json+ for you.
+TIP: You don't need to call +as_json+ on the object that you want to render. If you use the +:json+ option, +render+ will automatically call +as_json+ for you.
h5. Rendering XML