From a00bca625f70ee99d3fdfe65b5bf08d932d168a2 Mon Sep 17 00:00:00 2001 From: Vasiliy Ermolovich Date: Thu, 17 May 2012 23:01:35 +0300 Subject: update AS docs --- guides/source/active_support_core_extensions.textile | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'guides/source') 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 [:space:], so for example U+2029 (paragraph separator) is considered to be whitespace. In Ruby 1.8 whitespace is considered to be \s together with the ideographic space U+3000. +INFO: The predicate for strings uses the Unicode-aware character class [:space:], 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 :db 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 :db as argument. That's typically used with collections of ARs. Returned strings are: [].to_formatted_s(:db) # => "null" @@ -2869,8 +2869,6 @@ d.prev_year # => Sun, 28 Feb 1999 d.next_year # => Wed, 28 Feb 2001 -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 -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+ -- cgit v1.2.3 From 33284014c65f7cb0c342caeeda32baf10db71cfc Mon Sep 17 00:00:00 2001 From: Oscar Del Ben Date: Thu, 17 May 2012 14:34:53 -0700 Subject: Add oscardelben to authors --- guides/source/credits.html.erb | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'guides/source') diff --git a/guides/source/credits.html.erb b/guides/source/credits.html.erb index da6bd6acdf..af4c1d20a4 100644 --- a/guides/source/credits.html.erb +++ b/guides/source/credits.html.erb @@ -31,6 +31,10 @@ Ruby on Rails Guides: Credits Ryan Bigg works as a consultant at RubyX and has been working with Rails since 2006. He's co-authoring a book called Rails 3 in Action and he's written many gems which can be seen on his GitHub page and he also tweets prolifically as @ryanbigg. <% end %> +<%= author('Oscar Del Ben', 'oscardelben', 'oscardelben.jpg') do %> + Oscar Del Ben is a software engineer at Wildfire. He's a regular open source contributor (Github account) and tweets regularly at @oscardelben. +<% end %> + <%= author('Frederick Cheung', 'fcheung') do %> Frederick Cheung is Chief Wizard at Texperts where he has been using Rails since 2006. He is based in Cambridge (UK) and when not consuming fine ales he blogs at spacevatican.org. <% end %> -- cgit v1.2.3 From 2e2d3814497baacd2c6d0764f8430943cc1d4a7c Mon Sep 17 00:00:00 2001 From: Ryan Bigg Date: Fri, 18 May 2012 12:16:42 +1000 Subject: [engines] initializer method call needs an argument for initializer name --- guides/source/engines.textile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'guides/source') 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+ -initializer do |app| +initializer "blorgh.assets.precompile" do |app| app.config.assets.precompile += %w(admin.css admin.js) end -- cgit v1.2.3 From 21bff1d66477f5cf27bc7ada675866d810116d23 Mon Sep 17 00:00:00 2001 From: Rich Healey Date: Fri, 18 May 2012 16:52:52 +1000 Subject: The middleware stack is compliant with Enumarable and bits of Array Try to clarify the docs so that it's more clear how the stack behaves. --- guides/source/rails_on_rack.textile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'guides/source') diff --git a/guides/source/rails_on_rack.textile b/guides/source/rails_on_rack.textile index ff862273fd..4105641298 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 -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 many +Array+ methods, including [] unshift delete. Methods described in the section above are just convenience methods. Append following lines to your application configuration: -- cgit v1.2.3 From b5e15f37bb238477a197bfbcccef9618d212128d Mon Sep 17 00:00:00 2001 From: Oscar Del Ben Date: Fri, 18 May 2012 08:41:27 -0700 Subject: Revert "Add oscardelben to authors" This reverts commit 33284014c65f7cb0c342caeeda32baf10db71cfc. Reason: this change doesn't belong to DocRails. --- guides/source/credits.html.erb | 4 ---- 1 file changed, 4 deletions(-) (limited to 'guides/source') diff --git a/guides/source/credits.html.erb b/guides/source/credits.html.erb index af4c1d20a4..da6bd6acdf 100644 --- a/guides/source/credits.html.erb +++ b/guides/source/credits.html.erb @@ -31,10 +31,6 @@ Ruby on Rails Guides: Credits Ryan Bigg works as a consultant at RubyX and has been working with Rails since 2006. He's co-authoring a book called Rails 3 in Action and he's written many gems which can be seen on his GitHub page and he also tweets prolifically as @ryanbigg. <% end %> -<%= author('Oscar Del Ben', 'oscardelben', 'oscardelben.jpg') do %> - Oscar Del Ben is a software engineer at Wildfire. He's a regular open source contributor (Github account) and tweets regularly at @oscardelben. -<% end %> - <%= author('Frederick Cheung', 'fcheung') do %> Frederick Cheung is Chief Wizard at Texperts where he has been using Rails since 2006. He is based in Cambridge (UK) and when not consuming fine ales he blogs at spacevatican.org. <% end %> -- cgit v1.2.3 From 12b6307c89118bc1178fe8c24190c0fa559a9afa Mon Sep 17 00:00:00 2001 From: Damien Mathieu <42@dmathieu.com> Date: Sat, 19 May 2012 11:06:24 +0300 Subject: fix typo. probem => problem --- guides/source/getting_started.textile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'guides/source') 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 -- cgit v1.2.3 From d0a3be308c141ddebf86a8cf7dcb360965c57d36 Mon Sep 17 00:00:00 2001 From: Vijay Dev Date: Sat, 19 May 2012 17:40:40 +0530 Subject: copy edits [ci skip] --- guides/source/rails_on_rack.textile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'guides/source') diff --git a/guides/source/rails_on_rack.textile b/guides/source/rails_on_rack.textile index 4105641298..d8910cf1d0 100644 --- a/guides/source/rails_on_rack.textile +++ b/guides/source/rails_on_rack.textile @@ -154,7 +154,7 @@ config.middleware.swap ActionDispatch::ShowExceptions, Lifo::ShowExceptions h5. Middleware Stack is an Enumerable -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 many +Array+ methods, including [] unshift delete. 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 [], +unshift+ and +delete+. Methods described in the section above are just convenience methods. Append following lines to your application configuration: -- cgit v1.2.3