Reputation: 505
I'm in a bit of a pickle here as I have used Daniel Kehoe's excellent Rails Composer to build a small app. I'm also using Devise for authentication.
I had the bright idea to create a "registrations" controller/model to enable my users to register to different classes they want to attend. Obviously, this is wrecking havoc in my app and I'd like to know what is the best way to get out of this said pickle :)
I'm left with two choices and would like to have you Rails experts chime in:
What change should I plan on doing?
Thanks for your help!
Francis
Upvotes: 1
Views: 555
Reputation: 4382
Wrap your registrations controller in a module/namespace.
Classroom::RegistrationsController
end
Then make sure the views of the registrations controller are inside a directory of classroom.
-views
--classroom
---registrations
----new.html.erb
In your routes.rb, put the regsitration routes in a namespace.
namespace :classroom do
resources :registrations
end
Upvotes: 1