ruby - Creating nested resources in Rails 4 -
i want make rails-app logic this: every client has campaign, every campaign has quest, every quest has mission. campaign belongs_to client, quest belongs_to campaign , mission belongs_to quest. im trying make nested routes "/client/client_id/campaigns/campaign_id/quest/quest_id/mission" , how should make routing? if have 4-level nesting in routes if fine? how should make index action client_quests?
i think know answer. in routes.rb
resources :clients resources :campaigns ........... on... end end
Comments
Post a Comment