aboutsummaryrefslogtreecommitdiffstats
path: root/guides/source
diff options
context:
space:
mode:
authorVijay Dev <vijaydev.cse@gmail.com>2012-05-19 19:36:48 +0530
committerVijay Dev <vijaydev.cse@gmail.com>2012-05-19 19:36:48 +0530
commit1551de3c04bf872423683926f92916abe2a49ad1 (patch)
tree156daec67fc0305f7723ddc8f157523b50b1d758 /guides/source
parent71a83a9cfde71293abcebd98e874f317aa83160e (diff)
parent4adfd8e68db88e08ea39c05a14a3375651f058d3 (diff)
downloadrails-1551de3c04bf872423683926f92916abe2a49ad1.tar.gz
rails-1551de3c04bf872423683926f92916abe2a49ad1.tar.bz2
rails-1551de3c04bf872423683926f92916abe2a49ad1.zip
Merge branch 'master' of github.com:lifo/docrails
Diffstat (limited to 'guides/source')
-rw-r--r--guides/source/active_support_core_extensions.textile8
-rw-r--r--guides/source/engines.textile2
-rw-r--r--guides/source/getting_started.textile2
-rw-r--r--guides/source/rails_on_rack.textile4
4 files changed, 6 insertions, 10 deletions
diff --git a/guides/source/active_support_core_extensions.textile b/guides/source/active_support_core_extensions.textile
index 6443255f5d..80faffa49c 100644
--- a/guides/source/active_support_core_extensions.textile
+++ b/guides/source/active_support_core_extensions.textile
@@ -84,7 +84,7 @@ The following values are considered to be blank in a Rails application:
* any other object that responds to +empty?+ and it is empty.
-INFO: In Ruby 1.9 the predicate for strings uses the Unicode-aware character class <tt>[:space:]</tt>, so for example U+2029 (paragraph separator) is considered to be whitespace. In Ruby 1.8 whitespace is considered to be <tt>\s</tt> together with the ideographic space U+3000.
+INFO: The predicate for strings uses the Unicode-aware character class <tt>[:space:]</tt>, so for example U+2029 (paragraph separator) is considered to be whitespace.
WARNING: Note that numbers are not mentioned, in particular 0 and 0.0 are *not* blank.
@@ -2093,7 +2093,7 @@ h5. +to_formatted_s+
The method +to_formatted_s+ acts like +to_s+ by default.
-If the array contains items that respond to +id+, however, it may be passed the symbol <tt>:db</tt> as argument. That's typically used with collections of ARs, though technically any object in Ruby 1.8 responds to +id+ indeed. Returned strings are:
+If the array contains items that respond to +id+, however, it may be passed the symbol <tt>:db</tt> as argument. That's typically used with collections of ARs. Returned strings are:
<ruby>
[].to_formatted_s(:db) # => "null"
@@ -2869,8 +2869,6 @@ d.prev_year # => Sun, 28 Feb 1999
d.next_year # => Wed, 28 Feb 2001
</ruby>
-Active Support defines these methods as well for Ruby 1.8.
-
+prev_year+ is aliased to +last_year+.
h6. +prev_month+, +next_month+
@@ -2892,8 +2890,6 @@ Date.new(2000, 5, 31).next_month # => Fri, 30 Jun 2000
Date.new(2000, 1, 31).next_month # => Tue, 29 Feb 2000
</ruby>
-Active Support defines these methods as well for Ruby 1.8.
-
+prev_month+ is aliased to +last_month+.
h6. +beginning_of_week+, +end_of_week+
diff --git a/guides/source/engines.textile b/guides/source/engines.textile
index 880be57fb5..c35305a822 100644
--- a/guides/source/engines.textile
+++ b/guides/source/engines.textile
@@ -738,7 +738,7 @@ This tells sprockets to add you engine assets when +rake assets:precompile+ is r
You can define assets for precompilation in +engine.rb+
<ruby>
-initializer do |app|
+initializer "blorgh.assets.precompile" do |app|
app.config.assets.precompile += %w(admin.css admin.js)
end
</ruby>
diff --git a/guides/source/getting_started.textile b/guides/source/getting_started.textile
index 19bd106ff0..e25dac22da 100644
--- a/guides/source/getting_started.textile
+++ b/guides/source/getting_started.textile
@@ -678,7 +678,7 @@ end
This change will ensure that all changes made through HTML forms can edit the content of the text and title fields.
It will not be possible to define any other field value through forms. You can still define them by calling the `field=` method of course.
-Accessible attributes and the mass assignment probem is covered in details in the "Security guide":security.html#mass-assignment
+Accessible attributes and the mass assignment problem is covered in details in the "Security guide":security.html#mass-assignment
h4. Adding Some Validation
diff --git a/guides/source/rails_on_rack.textile b/guides/source/rails_on_rack.textile
index ff862273fd..d8910cf1d0 100644
--- a/guides/source/rails_on_rack.textile
+++ b/guides/source/rails_on_rack.textile
@@ -152,9 +152,9 @@ You can swap an existing middleware in the middleware stack using +config.middle
config.middleware.swap ActionDispatch::ShowExceptions, Lifo::ShowExceptions
</ruby>
-h5. Middleware Stack is an Array
+h5. Middleware Stack is an Enumerable
-The middleware stack behaves just like a normal +Array+. You can use any +Array+ methods to insert, reorder, or remove items from the stack. Methods described in the section above are just convenience methods.
+The middleware stack behaves just like a normal +Enumerable+. You can use any +Enumerable+ methods to manipulate or interrogate the stack. The middleware stack also implements some +Array+ methods including <tt>[]</tt>, +unshift+ and +delete+. Methods described in the section above are just convenience methods.
Append following lines to your application configuration: