ruby on rails - Better way to make nested resources? -


in routes.rb have following code create nested paths students , subjects under student_groups:

resources :student_groups   resources :students, :subjects end 

i want nest goals under subjects without generating new routes subjects along nested routes goals. i've done via following (plus appropriate stub action in subject_controller):

resources :subjects, :only => :stub   resources :goals end  

this works fine - have functionality of goals being nested under subjects without routes generated if didn't use stub.

edit: question this: there better/less hack-y way in rails?


Comments

Popular posts from this blog

image - ClassNotFoundException when add a prebuilt apk into system.img in android -

I need to import mysql 5.1 to 5.5? -

Java, Hibernate, MySQL - store UTC date-time -