envato-archive / guide

Document your application with a living component library and styleguide
https://rubygems.org/gems/guide
MIT License
8 stars 3 forks source link

Draw node and scenario routes in engine #10

Closed jiexinhuang closed 8 years ago

jiexinhuang commented 8 years ago

User only need to mount the engine and get all the routes!

Also ignore more tmp files

jiexinhuang commented 8 years ago

@lukearndt What do you think about 0697316020e3ba798969f28c3db1c925c1a51132 ?

lukearndt commented 8 years ago

I like the idea of making this a config option.

jiexinhuang commented 8 years ago

I don't see any other options than ActionController::Base and ApplicationContoller so boolean value sounds fine to me.

lukearndt commented 8 years ago

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.

jiexinhuang commented 8 years ago

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:

jiexinhuang commented 8 years ago

Merging