diff options
author | AvnerCohen <israbirding@gmail.com> | 2012-10-31 21:19:44 +0200 |
---|---|---|
committer | AvnerCohen <israbirding@gmail.com> | 2012-10-31 21:19:44 +0200 |
commit | d20a52930aa80d7f219465d6fc414a68b16ef2a8 (patch) | |
tree | 599a0f021b1b8a321fe0fafb426a885ae534f4c5 /actionpack/lib/action_dispatch/routing/route_set.rb | |
parent | be4a4cd38ff2c2db0f6b69bb72fb3557bd5a6e21 (diff) | |
download | rails-d20a52930aa80d7f219465d6fc414a68b16ef2a8.tar.gz rails-d20a52930aa80d7f219465d6fc414a68b16ef2a8.tar.bz2 rails-d20a52930aa80d7f219465d6fc414a68b16ef2a8.zip |
1.9 hash syntax changes to docs
Diffstat (limited to 'actionpack/lib/action_dispatch/routing/route_set.rb')
-rw-r--r-- | actionpack/lib/action_dispatch/routing/route_set.rb | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/actionpack/lib/action_dispatch/routing/route_set.rb b/actionpack/lib/action_dispatch/routing/route_set.rb index 060d0bfa2f..61071d1228 100644 --- a/actionpack/lib/action_dispatch/routing/route_set.rb +++ b/actionpack/lib/action_dispatch/routing/route_set.rb @@ -176,11 +176,11 @@ module ActionDispatch # # Instead of: # - # foo_url(:bar => bar, :baz => baz, :bang => bang) + # foo_url(bar: bar, baz: baz, bang: bang) # # Also allow options hash, so you can do: # - # foo_url(bar, baz, bang, :sort_by => 'baz') + # foo_url(bar, baz, bang, sort_by: 'baz') # def define_url_helper(route, name, options) @module.module_eval <<-END_EVAL, __FILE__, __LINE__ + 1 @@ -471,7 +471,7 @@ module ActionDispatch # If an explicit :controller was given, always make :action explicit # too, so that action expiry works as expected for things like # - # generate({:controller => 'content'}, {:controller => 'content', :action => 'show'}) + # generate({controller: 'content'}, {controller: 'content', action: 'show'}) # # (the above is from the unit tests). In the above case, because the # controller was explicitly given, but no action, the action is implied to @@ -500,7 +500,7 @@ module ActionDispatch use_recall_for(:id) end - # if the current controller is "foo/bar/baz" and :controller => "baz/bat" + # if the current controller is "foo/bar/baz" and controller: "baz/bat" # is specified, the controller becomes "foo/baz/bat" def use_relative_controller! if !named_route && different_controller? && !controller.start_with?("/") @@ -516,8 +516,8 @@ module ActionDispatch @options[:controller] = controller.sub(%r{^/}, '') if controller end - # This handles the case of :action => nil being explicitly passed. - # It is identical to :action => "index" + # This handles the case of action: nil being explicitly passed. + # It is identical to action: "index" def handle_nil_action! if options.has_key?(:action) && options[:action].nil? options[:action] = 'index' |