diff options
author | Piotr Sarnacki <drogus@gmail.com> | 2010-08-25 19:02:21 +0200 |
---|---|---|
committer | Piotr Sarnacki <drogus@gmail.com> | 2010-09-03 22:59:14 +0200 |
commit | 34cd8a68b1a06384d7acf3843e1eb9bea1e5f811 (patch) | |
tree | 112187e5c523c34622b2f6a86390b86a3ac7496c | |
parent | 706a3223a303d56feeee2cc7601da1bd9f381243 (diff) | |
download | rails-34cd8a68b1a06384d7acf3843e1eb9bea1e5f811.tar.gz rails-34cd8a68b1a06384d7acf3843e1eb9bea1e5f811.tar.bz2 rails-34cd8a68b1a06384d7acf3843e1eb9bea1e5f811.zip |
Add some more docs on polymorphic_url with routes proxy
-rw-r--r-- | railties/lib/rails/engine.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/railties/lib/rails/engine.rb b/railties/lib/rails/engine.rb index bc3014adaa..4cd4dbd2e8 100644 --- a/railties/lib/rails/engine.rb +++ b/railties/lib/rails/engine.rb @@ -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" |