Forum: Ruby on Rails where do i put an modified String class?

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Chris (Guest)
on 2006-03-14 18:19
hi, i have added a few methods to the String class and im unsure where
in my rails  app to put them. Any ideas?

Thanks,
Chris
Josh S. (Guest)
on 2006-03-14 18:32
Chris wrote:
> hi, i have added a few methods to the String class and im unsure where
> in my rails  app to put them. Any ideas?
>
> Thanks,
> Chris

The lib directory should work fine. If your file is string_methods.rb,
put this in your environment.rb:
require "lib/string_methods"

--josh
http://blog.hasmanythrough.com
This topic is locked and can not be replied to.