You''d put it in your lib directory.
RSL
On 3/15/07, rinda <akbarhome-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
wrote:>
>
> Hi,
>
> I need my string in all application (in app directory) has this
> method:
> "Ruby Is Great".downscore => "ruby_is_great"
>
> So I redefine String class:
> class String
> def downscore
> self.downcase.gsub(/\s/,''_'')
> end
> end
>
> The question is where I put this stuff in my ror directory by
> convention. Should I put in lib folder or config directory? Right now
> waiting your answers, I put it in config/environment.rb.
>
> Thank you.
>
>
> >
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---