mirror of
https://github.com/github/rails.git
synced 2026-04-26 03:00:59 -04:00
Merge branch 'master' of github.com:lifo/docrails
This commit is contained in:
@@ -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.
|
||||
|
||||
@@ -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
|
||||
|
||||
<ruby>
|
||||
people.pluck(:name) # => [ "David Heinemeier Hansson", "Jamie Heinemeier Hansson" ]
|
||||
</ruby>
|
||||
|
||||
NOTE: Defined in +active_support/core_ext/enumerable.rb+.
|
||||
|
||||
h4. +each_with_object+
|
||||
|
||||
The +inject+ method offers iteration with an accumulator:
|
||||
|
||||
@@ -410,10 +410,6 @@ For Apache:
|
||||
|
||||
<plain>
|
||||
<LocationMatch "^/assets/.*$">
|
||||
# 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;
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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:
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user