rails/rails — Issue #4520: Routes with an Asset Model
Author: daniel2d2art
Created: 2012-01-18 15:49:01+00:00
State: open

Yep! "Asset" model name, it may not best name to work together the asset pipeline. (but when rename name it's not an option). I don't know pipeline components take part for method aliases for asset_path ... but

routes for "Asset" model aren't build:

resources :assets

Don't produces any route

Used in nested routes, it's build the nested route but not the asset routes

resources :foo do
resources :assets
end
resources :assets

Aboves build:

[...]
foo_assets GET /foos/:foo_id/assets(.:format) {:action=>"index", :controller=>"assets"}
POST /foos/:foo_id/assets(.:format) {:action=>"create", :controller=>"assets"}
new_foo_asset GET /foos/:foo_id/assets/new(.:format) {:action=>"new", :controller=>"assets"}
edit_foo_asset GET /foos/:foo_id/assets/:id/edit(.:format) {:action=>"edit", :controller=>"assets"}
foo_asset GET /foos/:foo_id/assets/:id(.:format) {:action=>"show", :controller=>"assets"}
PUT /foos/:foo_id/assets/:id(.:format) {:action=>"update", :controller=>"assets"}
DELETE /foos/:foo_id/assets/:id(.:format) {:action=>"destroy", :controller=>"assets"}
[...]

But NOT build, the directly Asset routes