Answer the question
In order to leave comments, you need to log in
How to implement plugins for an application?
Hello Toaster!
There is an application on rails, which is essentially a kind of task scheduler that will run tasks from plugins. Now you need to somehow write and embed plugins into it, which will have to use models from the main application and each other's capabilities. Something like plugins from wordpress. What is the right way to implement this in Rails?
Answer the question
In order to leave comments, you need to log in
In essence, you write the same code as usual, just call it "Plugin".
I do this:
In the controllers folder, in javascripts, stylesheets and views put the modules folder. (in my project I just call them modules)
I create a controller
A controller is created, script style. I throw the sheets with my hands.
Then, where necessary, I connect the script and the plugin style.
/*
*= require module/name_module.css
*/
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question