ruby on rails - Error when removing '::Base' from ActionController -


i'm writing rails application, , in 1 controller need specify layout render due inheriting actioncontroller::base. in of other controllers have actioncontroller , automatically uses application layout. whenever remove ::base, following message when accessing page superclass must class (module given).

why inheriting actioncontroller::base in controller matter, not in others?

to directly answer question actioncontroller not controller class, it's namespacing module powers entire controller stack. not interact actioncontroller module during typical rails development. actioncontroller::base class controllers inherit from. why can't inherit actioncontroller.

but think there 2 controllers in play here. actioncontroller::base , applicationcontroller. think might mistaking applicationcontroller being actioncontroller without ::base.

actioncontroller::base main controller class of rails functionality comes from. applicationcontroller generalized controller can add methods , have of other rails controllers inherit from.

you following use different layout in 1 of controllers:

class authenticationcontroller < applicationcontroller   layout 'authentication' end 

you can either use authenticationcontroller directly, or have new controllers inherit authenticationcontroller.


Comments

Popular posts from this blog

delphi - How to convert bitmaps to video? -

jasper reports - Fixed header in Excel using JasperReports -

python - ('The SQL contains 0 parameter markers, but 50 parameters were supplied', 'HY000') or TypeError: 'tuple' object is not callable -