aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorXavier Noria <fxn@hashref.com>2011-07-23 12:14:10 +0200
committerXavier Noria <fxn@hashref.com>2011-07-23 12:14:10 +0200
commit38310ab1a6f559860e25b0e28bef9560bb452ae6 (patch)
tree7bba14b20d2870d8aebd3b6f52f458a77e6787b6
parent2db9a7e930f44aeeda175458a475911c2fa33f40 (diff)
downloadrails-38310ab1a6f559860e25b0e28bef9560bb452ae6.tar.gz
rails-38310ab1a6f559860e25b0e28bef9560bb452ae6.tar.bz2
rails-38310ab1a6f559860e25b0e28bef9560bb452ae6.zip
little details seen while doing a pass through what's new in docrails
-rw-r--r--actionpack/lib/action_view/helpers/date_helper.rb2
-rw-r--r--actionpack/lib/action_view/helpers/form_helper.rb12
-rw-r--r--railties/guides/source/asset_pipeline.textile8
-rw-r--r--railties/lib/rails/engine.rb3
-rw-r--r--railties/lib/rails/paths.rb16
5 files changed, 21 insertions, 20 deletions
diff --git a/actionpack/lib/action_view/helpers/date_helper.rb b/actionpack/lib/action_view/helpers/date_helper.rb
index 3eb8d039bc..e850c258ce 100644
--- a/actionpack/lib/action_view/helpers/date_helper.rb
+++ b/actionpack/lib/action_view/helpers/date_helper.rb
@@ -290,7 +290,7 @@ module ActionView
InstanceTag.new(object_name, method, self, options.delete(:object)).to_datetime_select_tag(options, html_options)
end
- # Returns a set of html select-tags (one for year, month, day, hour, minute and second) pre-selected with the
+ # Returns a set of html select-tags (one for year, month, day, hour, minute, and second) pre-selected with the
# +datetime+. It's also possible to explicitly set the order of the tags using the <tt>:order</tt> option with
# an array of symbols <tt>:year</tt>, <tt>:month</tt> and <tt>:day</tt> in the desired order. If you do not
# supply a Symbol, it will be appended onto the <tt>:order</tt> passed in. You can also add
diff --git a/actionpack/lib/action_view/helpers/form_helper.rb b/actionpack/lib/action_view/helpers/form_helper.rb
index f378b92dd6..724fe7a518 100644
--- a/actionpack/lib/action_view/helpers/form_helper.rb
+++ b/actionpack/lib/action_view/helpers/form_helper.rb
@@ -860,8 +860,8 @@ module ActionView
end
# Returns an input of type "search" for accessing a specified attribute (identified by +method+) on an object
- # assigned to the template (identified by +object+). Inputs of type "search" may be styled differently by
- # some browsers
+ # assigned to the template (identified by +object_name+). Inputs of type "search" may be styled differently by
+ # some browsers.
#
# ==== Examples
#
@@ -880,7 +880,7 @@ module ActionView
# # => <input autosave="false" id="user_name" incremental="true" name="user[name]" onsearch="true" size="30" type="search" />
# search_field(:user, :name, :autosave => true, :onsearch => true)
# # => <input autosave="com.example.www" id="user_name" incremental="true" name="user[name]" onsearch="true" results="10" size="30" type="search" />
-
+ #
def search_field(object_name, method, options = {})
options = options.stringify_keys
@@ -902,7 +902,7 @@ module ActionView
#
# telephone_field("user", "phone")
# # => <input id="user_phone" name="user[phone]" size="30" type="tel" />
-
+ #
def telephone_field(object_name, method, options = {})
InstanceTag.new(object_name, method, self, options.delete(:object)).to_input_field_tag("tel", options)
end
@@ -912,7 +912,7 @@ module ActionView
#
# url_field("user", "homepage")
# # => <input id="user_homepage" size="30" name="user[homepage]" type="url" />
-
+ #
def url_field(object_name, method, options = {})
InstanceTag.new(object_name, method, self, options.delete(:object)).to_input_field_tag("url", options)
end
@@ -921,7 +921,7 @@ module ActionView
#
# email_field("user", "address")
# # => <input id="user_address" size="30" name="user[address]" type="email" />
-
+ #
def email_field(object_name, method, options = {})
InstanceTag.new(object_name, method, self, options.delete(:object)).to_input_field_tag("email", options)
end
diff --git a/railties/guides/source/asset_pipeline.textile b/railties/guides/source/asset_pipeline.textile
index 0d29b77b63..5999c78369 100644
--- a/railties/guides/source/asset_pipeline.textile
+++ b/railties/guides/source/asset_pipeline.textile
@@ -42,7 +42,7 @@ h4. What is Fingerprinting and Why Should I Care?
Fingerprinting is a technique where the filenames of content that is static or infrequently updated is altered to be unique to the content contained in the file.
-When a filename is unique and based on its content, http headers can be set to encourage caches everywhere (at ISPs, in browsers) to keep their own copy of the content. When the content is updated, the fingerprint will change and the remote clients will request the new file. This is generally known as _cachebusting_.
+When a filename is unique and based on its content, HTTP headers can be set to encourage caches everywhere (at ISPs, in browsers) to keep their own copy of the content. When the content is updated, the fingerprint will change and the remote clients will request the new file. This is generally known as _cachebusting_.
The most effective technique is to insert a hash of the content into the name, usually at the end. For example a CSS file +global.css+ is hashed and the filename is updated to incorporate the hash.
@@ -218,7 +218,7 @@ Keep in mind that the order of these pre-processors is important. For example, i
h3. In Development
-In the development environment assets are compiled and cached on the first request after the server is started. Sprockets sets a +must-validate+ cache-control http header to reduce request overhead on subsequent requests - on these the browser gets a 304 (not-modified) response.
+In the development environment assets are compiled and cached on the first request after the server is started. Sprockets sets a +must-validate+ Cache-Control HTTP header to reduce request overhead on subsequent requests - on these the browser gets a 304 (not-modified) response.
If any of the files in the manifest have changed between requests, the server will respond with a new compiled file.
@@ -258,9 +258,9 @@ On the first request the assets are compiled and cached as described above, howe
/assets/application-4dd5b109ee3439da54f5bdfd78a80473.css
</plain>
-The MD5 is generated from the contents of the compiled files, and is included in the http +Content-MD5+ header.
+The MD5 is generated from the contents of the compiled files, and is included in the HTTP +Content-MD5+ header.
-Sprockets also sets the +Cache-Control+ http header to +max-age=31536000+. This signals all caches between your server and the client browser that this content (the file served) can be cached for 1 year. The effect of this is to reduce the number of requests for this asset from your server; the asset has a good chance of being in the local browser cache or some intermediate cache.
+Sprockets also sets the +Cache-Control+ HTTP header to +max-age=31536000+. This signals all caches between your server and the client browser that this content (the file served) can be cached for 1 year. The effect of this is to reduce the number of requests for this asset from your server; the asset has a good chance of being in the local browser cache or some intermediate cache.
This behavior is controlled by the setting of +config.action_controller.perform_caching+ setting in Rails (which is +true+ for production, +false+ for everything else). This value is propagated to Sprockets during initialization for use when action_controller is not available.
diff --git a/railties/lib/rails/engine.rb b/railties/lib/rails/engine.rb
index b5b4c2becc..cb897e94d7 100644
--- a/railties/lib/rails/engine.rb
+++ b/railties/lib/rails/engine.rb
@@ -5,7 +5,7 @@ require 'rbconfig'
require 'rails/engine/railties'
module Rails
- # Rails::Engine allows you to wrap a specific Rails application or subset of
+ # <tt>Rails::Engine</tt> allows you to wrap a specific Rails application or subset of
# functionality and share it with other applications. Since Rails 3.0, every
# <tt>Rails::Application</tt> is just an engine, which allows for simple
# feature and application sharing.
@@ -176,6 +176,7 @@ module Rails
# == Engine name
#
# There are some places where an Engine's name is used:
+ #
# * routes: when you mount an Engine with <tt>mount(MyEngine::Engine => '/my_engine')</tt>,
# it's used as default :as option
# * some of the rake tasks are based on engine name, e.g. <tt>my_engine:install:migrations</tt>,
diff --git a/railties/lib/rails/paths.rb b/railties/lib/rails/paths.rb
index 6aecebe273..daa1bdfc29 100644
--- a/railties/lib/rails/paths.rb
+++ b/railties/lib/rails/paths.rb
@@ -2,7 +2,7 @@ require 'set'
module Rails
module Paths
- # This object is an extended hash that behaves as root of the Rails::Paths system.
+ # This object is an extended hash that behaves as root of the <tt>Rails::Paths</tt> system.
# It allows you to collect information about how you want to structure your application
# paths by a Hash like API. It requires you to give a physical path on initialization.
#
@@ -10,13 +10,13 @@ module Rails
# root.add "app/controllers", :eager_load => true
#
# The command above creates a new root object and add "app/controllers" as a path.
- # This means we can get a Path object back like below:
+ # This means we can get a +Rails::Paths::Path+ object back like below:
#
# path = root["app/controllers"]
# path.eager_load? # => true
# path.is_a?(Rails::Paths::Path) # => true
#
- # The Path object is simply an array and allows you to easily add extra paths:
+ # The +Path+ object is simply an array and allows you to easily add extra paths:
#
# path.is_a?(Array) # => true
# path.inspect # => ["app/controllers"]
@@ -24,17 +24,17 @@ module Rails
# path << "lib/controllers"
# path.inspect # => ["app/controllers", "lib/controllers"]
#
- # Notice that when you add a path using #add, the path object created already
- # contains the path with the same path value given to #add. In some situations,
+ # Notice that when you add a path using +add+, the path object created already
+ # contains the path with the same path value given to +add+. In some situations,
# you may not want this behavior, so you can give :with as option.
#
# root.add "config/routes", :with => "config/routes.rb"
# root["config/routes"].inspect # => ["config/routes.rb"]
#
- # The #add method accepts the following options as arguments:
+ # The +add+ method accepts the following options as arguments:
# eager_load, autoload, autoload_once and glob.
#
- # Finally, the Path object also provides a few helpers:
+ # Finally, the +Path+ object also provides a few helpers:
#
# root = Root.new "/rails"
# root.add "app/controllers"
@@ -42,7 +42,7 @@ module Rails
# root["app/controllers"].expanded # => ["/rails/app/controllers"]
# root["app/controllers"].existent # => ["/rails/app/controllers"]
#
- # Check the Path documentation for more information.
+ # Check the <tt>Rails::Paths::Path</tt> documentation for more information.
class Root < ::Hash
attr_accessor :path