I am somewhat new to RoR,
I want to have a structured directory, because project may become big I don't want to have all controllers directly into controllers
directory.
I would want something as
app/
controllers/
application_controller.rb
groupa/
athing_controller.rb
athing2_controller.rb
groupb/
bthing_controller.rb
However when I place in the routes.rb the following:
get 'athing', :to => "groupa/athing#index"
I get the following error on localhost:3000/athing/ :
superclass mismatch for class AthingController
Which is like:
class AthingController < ApplicationController
def index
end
end
Am I missing something? Can I place subdirectories at all?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With