I use polimorphic_path and it some buggy. This method require some route helper that not defined. How i can define (like regular method) own route helper wich will be used like "model_name_path, model_name_url etc"?
相关问题
- Question marks after images and js/css files in ra
- Using :remote => true with hover event
- Backbone.js PushState routes .htaccess only workin
- Eager-loading association count with Arel (Rails 3
- Laravel - Implicit route model binding with soft d
相关文章
- Right way to deploy Rails + Puma + Postgres app to
- AWS S3 in rails - how to set the s3_signature_vers
- how to call a active record named scope with a str
- How to add a JSON column in MySQL with Rails 5 Mig
- “No explicit conversion of Symbol into String” for
- form_for wrong number of arguments in rails 4
- Rspec controller error expecting <“index”> but
- Factory_girl has_one relation with validates_prese
This solution worked for me.
Add this code to the end of
config/routes.rb
file. Make sure to replaceMyApp
with your application's name.These custom methods will be available in controllers, views and tests.
I know one possible answer for _path, but the same isn't working for me for _url. Anybody know why?