From fca655f391953a1ba02988cb8e74913d4efbcd3a Mon Sep 17 00:00:00 2001 From: Leandro Santos Date: Wed, 30 Nov 2011 14:29:17 -0500 Subject: typo in the performance testing rails guide --- railties/guides/source/performance_testing.textile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'railties') diff --git a/railties/guides/source/performance_testing.textile b/railties/guides/source/performance_testing.textile index 2440927542..958b13cd9e 100644 --- a/railties/guides/source/performance_testing.textile +++ b/railties/guides/source/performance_testing.textile @@ -151,7 +151,7 @@ Performance tests can be run in two modes: Benchmarking and Profiling. h5. Benchmarking -Benchmarking makes it easy to quickly gather a few metrics about each test tun. By default, each test case is run *4 times* in benchmarking mode. +Benchmarking makes it easy to quickly gather a few metrics about each test run. By default, each test case is run *4 times* in benchmarking mode. To run performance tests in benchmarking mode: -- cgit v1.2.3 From bb2adab79bd0fb039a368b424a3bc97bac073265 Mon Sep 17 00:00:00 2001 From: Tim Sjoberg Date: Thu, 1 Dec 2011 14:27:51 +0200 Subject: fixed finger-dyslexia in active_support core extensions guide --- railties/guides/source/active_support_core_extensions.textile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'railties') diff --git a/railties/guides/source/active_support_core_extensions.textile b/railties/guides/source/active_support_core_extensions.textile index 7959a88c5b..fbccff5005 100644 --- a/railties/guides/source/active_support_core_extensions.textile +++ b/railties/guides/source/active_support_core_extensions.textile @@ -1301,7 +1301,7 @@ NOTE: Defined in +active_support/core_ext/string/output_safety.rb+. h5. Transformation -As a rule of thumb, except perhaps for concatenation as explained above, any method that may change a string gives you an unsafe string. These are +donwcase+, +gsub+, +strip+, +chomp+, +underscore+, etc. +As a rule of thumb, except perhaps for concatenation as explained above, any method that may change a string gives you an unsafe string. These are +downcase+, +gsub+, +strip+, +chomp+, +underscore+, etc. In the case of in-place transformations like +gsub!+ the receiver itself becomes unsafe. -- cgit v1.2.3 From d72a85c0224902005d22ad4981358fcc985b318c Mon Sep 17 00:00:00 2001 From: Richard Hulse Date: Fri, 2 Dec 2011 10:44:34 +1300 Subject: [docs] removed last-modifed line from examples This is no longer best-practice. ref: http://stackoverflow.com/questions/8344186/rails-3-1-on-apache-pagespeed-says-specify-cache-validator-when-using-asset-p/8348385#8348385 --- railties/guides/source/asset_pipeline.textile | 8 -------- 1 file changed, 8 deletions(-) (limited to 'railties') diff --git a/railties/guides/source/asset_pipeline.textile b/railties/guides/source/asset_pipeline.textile index 3681501293..8ff1035a1c 100644 --- a/railties/guides/source/asset_pipeline.textile +++ b/railties/guides/source/asset_pipeline.textile @@ -410,10 +410,6 @@ For Apache: - # Some browsers still send conditional-GET requests if there's a - # Last-Modified header or an ETag header even if they haven't - # reached the expiry date sent in the Expires header. - Header unset Last-Modified Header unset ETag FileETag None # RFC says only cache for 1 year @@ -429,10 +425,6 @@ location ~ ^/assets/ { expires 1y; add_header Cache-Control public; - # Some browsers still send conditional-GET requests if there's a - # Last-Modified header or an ETag header even if they haven't - # reached the expiry date sent in the Expires header. - add_header Last-Modified ""; add_header ETag ""; break; } -- cgit v1.2.3 From 330db28018e1a3119fdc0b274b5022ed4126a0e9 Mon Sep 17 00:00:00 2001 From: Arun Agrawal Date: Fri, 2 Dec 2011 08:44:32 +0530 Subject: Adding information about ActionDispatch::DebugExceptions --- railties/guides/source/command_line.textile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'railties') diff --git a/railties/guides/source/command_line.textile b/railties/guides/source/command_line.textile index 9284a542f3..3fa6c059e1 100644 --- a/railties/guides/source/command_line.textile +++ b/railties/guides/source/command_line.textile @@ -391,7 +391,7 @@ Action Pack version 3.2.0.beta Active Resource version 3.2.0.beta Action Mailer version 3.2.0.beta Active Support version 3.2.0.beta -Middleware ActionDispatch::Static, Rack::Lock, Rack::Runtime, Rack::MethodOverride, ActionDispatch::RequestId, Rails::Rack::Logger, ActionDispatch::ShowExceptions, ActionDispatch::RemoteIp, ActionDispatch::Reloader, ActionDispatch::Callbacks, ActiveRecord::ConnectionAdapters::ConnectionManagement, ActiveRecord::QueryCache, ActionDispatch::Cookies, ActionDispatch::Session::CookieStore, ActionDispatch::Flash, ActionDispatch::ParamsParser, ActionDispatch::Head, Rack::ConditionalGet, Rack::ETag, ActionDispatch::BestStandardsSupport +Middleware ActionDispatch::Static, Rack::Lock, Rack::Runtime, Rack::MethodOverride, ActionDispatch::RequestId, Rails::Rack::Logger, ActionDispatch::ShowExceptions, ActionDispatch::DebugExceptions, ActionDispatch::RemoteIp, ActionDispatch::Reloader, ActionDispatch::Callbacks, ActiveRecord::ConnectionAdapters::ConnectionManagement, ActiveRecord::QueryCache, ActionDispatch::Cookies, ActionDispatch::Session::CookieStore, ActionDispatch::Flash, ActionDispatch::ParamsParser, ActionDispatch::Head, Rack::ConditionalGet, Rack::ETag, ActionDispatch::BestStandardsSupport Application root /home/foobar/commandsapp Environment development Database adapter sqlite3 -- cgit v1.2.3 From 9f623e21094a2797cd438eb03a6bccb2e359da62 Mon Sep 17 00:00:00 2001 From: Arun Agrawal Date: Fri, 2 Dec 2011 08:45:11 +0530 Subject: [Docs] Information about ActionDispatch::DebugExceptions in rake task --- railties/guides/source/rails_on_rack.textile | 1 + 1 file changed, 1 insertion(+) (limited to 'railties') diff --git a/railties/guides/source/rails_on_rack.textile b/railties/guides/source/rails_on_rack.textile index d6cbd84b1f..9526526bc7 100644 --- a/railties/guides/source/rails_on_rack.textile +++ b/railties/guides/source/rails_on_rack.textile @@ -95,6 +95,7 @@ use ActiveSupport::Cache::Strategy::LocalCache use Rack::Runtime use Rails::Rack::Logger use ActionDispatch::ShowExceptions +use ActionDispatch::DebugExceptions use ActionDispatch::RemoteIp use Rack::Sendfile use ActionDispatch::Callbacks -- cgit v1.2.3 From 3d550e5174d99e12fc7efe8273aa4eb970cfeeaf Mon Sep 17 00:00:00 2001 From: Arun Agrawal Date: Fri, 2 Dec 2011 23:15:08 +0530 Subject: Added doc about pluck for active_support core ext --- railties/guides/source/active_support_core_extensions.textile | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'railties') diff --git a/railties/guides/source/active_support_core_extensions.textile b/railties/guides/source/active_support_core_extensions.textile index fbccff5005..76d757f6a7 100644 --- a/railties/guides/source/active_support_core_extensions.textile +++ b/railties/guides/source/active_support_core_extensions.textile @@ -2053,6 +2053,16 @@ end NOTE: Defined in +active_support/core_ext/enumerable.rb+. +h4. +pluck+ + +Plucks the value of the passed method for each element and returns the result as an array + + +people.pluck(:name) # => [ "David Heinemeier Hansson", "Jamie Heinemeier Hansson" ] + + +NOTE: Defined in +active_support/core_ext/enumerable.rb+. + h4. +each_with_object+ The +inject+ method offers iteration with an accumulator: -- cgit v1.2.3