On Nov 18, 10:03 am, Frederick Cheung <[EMAIL PROTECTED]>
wrote:
> On Nov 18, 3:04 pm, Zhoran Tvalve <[EMAIL PROTECTED]>
> wrote:
>
> > Hi there!
> > I study Ruby on Rails and met a problem.
>
> > I placed a class definition code for class which is NOT a Model into
> > separate file, assume MyToolClass.rb
>
> > Then I started working on controller code and required 'MyToolClass'
>
> use require_dependency instead of require.
>
> Fred

But if the file name follows conventions (so a class named MyToolClass
would go in a file named app/models/my_tool_class.rb or lib/
my_tool_class.rb), then no require or require_dependency should be
needed and code changes will be automatically reloaded in development
mode.

If you're not following naming conventions, then do as Fred
suggests :-)

Jeff

www.purpleworkshops.com
--~--~---------~--~----~------------~-------~--~----~
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 [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to