I am using Ruby on Rails 3.2.2. In the <ROOT_APP>/lib/my_plugin directory I developed a “plugin” and now I am considering:
- to implement the MCV (Model-Control-View) architecture in the
<ROOT_APP>/lib/my_plugindirectory; - to make those related controllers, helpers and so on available to my application (where needed).
Is it possible to make that? If so, how? What do you advice about?
You should consider making a mountable application if you need controllers, models and views. Devise is a good gem to look at to get an example of how this is done. It’ll be a lot simpler than duplicating the entire structure of a Rails app in lib.