Sorry for the title but I can't find words to explain this exactly. I'm a bit confused in rails when I have to choose where should I place my external libraries.
For example, if I want to prepare a gem which will contain a lot of helpers that I can share across all my applications, what should it do? Should it install those helpers under my app/helpers dir?
Actually these are all directories I know where I could place external libraries:
- vendor/assets
- app/helpers
- vendor/plugins [which has been deprecated if I'm not wrong]
- lib/assets
- lib/tasks
What if I want create a method that can be used in controllers if they include something, where should I place such a file?
If I create a gem that can be used in rails, where should it install files?
I'm a bit lost, I always create a file but I feel a bit uncomfortable because I always don't know where should I place it.
Edit 1:
I want to add also a special case, where do you place a library written in javascript which directory structure is hardly tied up toghether, so you can't move css/images into different directories. How do you handle this? I created a directory in vendor/assets to make it works, but I don't know if it's the best way to solve this issue.