table_for
table_for copied to clipboard
Handling nested resources
I currently have a pretty standard route:
namespace :admin do
resources :subjects
end
But when i try to do
table_for @subjects
I get an error due to the route being admin_subjects_path
If I try
table_for [:admin, @subjects]
this also doesnt work.
How do we handle nested resources.
Could you please provide more details. What are you inserting inside table_for
block?
I can't reproduce with a simple example:
= table_for @planes do
- columns :id, :key, :title