Skip to content

Commit

Permalink
Add some more docs on polymorphic_url with routes proxy
Browse files Browse the repository at this point in the history
  • Loading branch information
drogus committed Sep 3, 2010
1 parent 706a322 commit 34cd8a6
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions railties/lib/rails/engine.rb
Expand Up @@ -237,6 +237,16 @@ module Rails
# end
#
# Note that :as option takes engine_name as default, so most of the time you can ommit it.
#
# If you want to generate url to engine's route using polymorphic_url, you can also use that helpers.
#
# Let's say that you want to create a form pointing to one of the engine's routes. All you need to do
# is passing helper as the first element in array with attributes for url:
#
# form_for([my_engine, @user])
#
# This code will use my_engine.user_path(@user) to generate proper route.
#
class Engine < Railtie
autoload :Configurable, "rails/engine/configurable"
autoload :Configuration, "rails/engine/configuration"
Expand Down

0 comments on commit 34cd8a6

Please sign in to comment.