Permalink
Browse files

copy edits [ci skip]

  • Loading branch information...
1 parent 925f07f commit 62499bcb9d8aa65636f5cd3ace2a818ffd4e2f8a @vijaydev vijaydev committed Aug 15, 2012
@@ -60,11 +60,15 @@ def optimize_routes_generation? #:nodoc:
#
# ==== Relying on named routes
#
- # Passing a record (like an Active Record) instead of a Hash as the options parameter will
+ # Passing a record (like an Active Record) instead of a hash as the options parameter will
# trigger the named route for that record. The lookup will happen on the name of the class. So passing a
# Workshop object will attempt to use the +workshop_path+ route. If you have a nested route, such as
# +admin_workshop_path+ you'll have to call that explicitly (it's impossible for +url_for+ to guess that route).
#
+ # ==== Implicit Controller Namespacing
+ #
+ # Controllers passed in using the +:controller+ option will retain their namespace unless it is an absolute one.
+ #
# ==== Examples
# <%= url_for(:action => 'index') %>
# # => /blog/
@@ -102,16 +106,13 @@ def optimize_routes_generation? #:nodoc:
# <%= url_for(:back) %>
# # if request.env["HTTP_REFERER"] is not set or is blank
# # => javascript:history.back()
- # ==== Implicit Controller Namespace
- #
- # Controllers passed in will retain their namespace unless an absolute controller is specified with a slash
#
- # # When called inside of the "admin" namespace
# <%= url_for(:action => 'index', :controller => 'users') %>
+ # # Assuming an "admin" namespace
# # => /admin/users
#
- # # Specify absolute path with beginning slash
# <%= url_for(:action => 'index', :controller => '/users') %>
+ # # Specify absolute path with beginning slash
# # => /users
def url_for(options = nil)
case options
@@ -1,9 +1,8 @@
-# Files in the config/locales directory are used for internationalization.
-# This file is for English, and is therefore named 'en.yml'. Add more files in
-# this directory for other locales. Rails will automatically load every
-# locale file in this directory.
+# Files in the config/locales directory are used for internationalization
+# and are automatically loaded by Rails. If you want to use locales other
+# than English, add the necessary files in this directory.
#
-# To use this location information, use `I18n.t`:
+# To use the locales, use `I18n.t`:
#
# I18n.t 'hello'
#
@@ -17,8 +16,8 @@
#
# This would use the information in config/locales/es.yml.
#
-# To learn more, read the internationalization Rails Guide:
-# http://guides.rubyonrails.org/i18n.html
+# To learn more, please read the Rails Internationalization guide
+# available at http://guides.rubyonrails.org/i18n.html.
en:
hello: "Hello world"

0 comments on commit 62499bc

Please sign in to comment.