Say for instance, if I have a class that computes PI, where would the best place to locate this class so that its accessible by the controllers and helpers? What if I wanted to make this generic class accessible to multiple RoR projects? TIA.
on 2005-11-25 04:20
on 2005-11-25 09:30
Make it a plugin if it's mainly for use in Rails projects... if it's generally applicable to any Ruby project, you might want to make it a Gem. http://wiki.rubyonrails.com/rails/pages/Plugins http://docs.rubygems.org/ - james
on 2005-11-25 10:38
The lib folder is also viable. Remember to include it in your environment.
on 2005-11-25 17:32
Is it possible to create a directory somewhere outside of the project and include that directory in the path?
on 2005-11-25 20:23
Rick wrote: > Is it possible to create a directory somewhere outside of the project > and include that directory in the path? You can sym link it: ls -s reusable_stuff/your_plugin your_rails_app/vendor/plugins/your_plugin - Scott