Rails: Where to place plugin files -


I am relatively new to rail and recently found some useful gems such as achieving the project and really fast To However, I was wondering where plug-in dependent models, views and controller files are located, but the main concept of my project is. For example, it is better to place the user, role, session, etc. Models and related controllers with the plugin inside the vendor / directory, or I use them to root model / , view / , and controllers / directory respectively?

Even models / plugins dependent thoughts / controllers with their other code Apes / Models , App / Views , and App / Controller should be placed in the directory.

The "structural" reason is that the bulk of all those files will still be specific to your application, you may end up adding the field to the user, or your users Add the_image statement to the model, etc. You want that code to be entered in all the core application code in the App directory.

The "functional" reason is that the code for code related specifically to the code is the vendor / plugins only that the plugin and behavior behave differently is done. For example, when you add a new plugin, it does not automatically load in development mode. So if your main files were there, they will not be automatically reloaded in the development mode.


Comments

Popular posts from this blog

oracle - The fastest way to check if some records in a database table? -

php - multilevel menu with multilevel array -

jQuery UI: Datepicker month format -