Closed jiexinhuang closed 8 years ago
@lukearndt What do you think about 0697316020e3ba798969f28c3db1c925c1a51132 ?
I like the idea of making this a config option.
I don't see any other options than ActionController::Base
and ApplicationContoller
so boolean value sounds fine to me.
I see other options. In Envato Market, for example, I'd like to create a dependency injection class:
class Guide::BaseControllerDependencyInjection < ActionController::Base
# include various mixins for authentication, authorisation and feature flips
# expose site helpers
# expose layout options helper
end
Then set the config value to have Guide::BaseController
inherit from this class.
Other applications might need to do something similar. The more flexible we make this, the more likely it is that people will be able to make good use of it.
Fair enough. But user might need to create subclasses of Guide::NodesController
and Guide::ScenariosController
and overwrite methods like authorisation_system
, which could be a good chance to include custom mixins as well. :smile:
Merging
User only need to mount the engine and get all the routes!
Also ignore more tmp files