Azz*_*rio 3 ruby ruby-on-rails nested-forms restful-url
我有这样的嵌套资源
resources :profiles do
resources :albums do
resources :images
end
end
match ':username' => "profiles#show", :as => 'profile'
Run Code Online (Sandbox Code Playgroud)
例如,特定图像的网址是
http://localhost:3000/profiles/Azzurrio/albums/4/images/1
Run Code Online (Sandbox Code Playgroud)
我不能在我的模板中使用配置文件用户名,当我使用params [:username]时它不起作用,所以任何人都可以告诉我如何处理这个参数?
| 归档时间: |
|
| 查看次数: |
3173 次 |
| 最近记录: |