How to make a public folder in my rails plugin?
For example, I have image in /my_rails_app/vendor/plugins/my_plugin/public/edit.gif but in http://localhost:3000/edit.gif i got routing error.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Directly you can’t use it. Plugins /public are not merged with main /public folder by default. Generally on deployment it is common to map only main /public but nobody exposes plugin’s to viewers.
You have to prepare rake task or generator which copies these files to apps /public folder.
Generally it may be possible to do some routing trickery but generally I’m not recommending it.