Hi, I noticed that classes present in app/controller, helper, models and views are all change aware. (The name for this escapes me). I mean if you change a certain controller, these changes are immediately available (development) without restarting any webserver. Q? how is this behavior called? I have some custom ruby classes not part of ruby on rails. Any changes made to these custom classes are not showing the same behavior. How can I extend this dynamic change behavior to my custom classes. Eg I have an extra folder of classes present in app/mycustomfolder which I would like to have this dynamic behavior. Thanks for any help, Cheers, Tiele -------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060118/57b081e5/attachment-0001.html
Wilson Bilkovich
2006-Jan-18 14:08 UTC
[Rails] question on when ruby classes are refreshed
On 1/18/06, Defrancq, Tiele <Tiele.Defrancq@bvdep.com> wrote:> I noticed that classes present in app/controller, helper, models and views > are all change aware. (The name for this escapes me). I mean if you change a > certain controller, these changes are immediately available (development) > without restarting any webserver. > > Q? how is this behavior called? > > I have some custom ruby classes not part of ruby on rails. Any changes made > to these custom classes are not showing the same behavior. How can I extend > this dynamic change behavior to my custom classes. > > Eg I have an extra folder of classes present in app/mycustomfolder which I > would like to have this dynamic behavior. >This behavior is turned on in the development environment. You can control it by editing config/environments/development.rb If you ''require'' your library in environment.rb or boot.rb, it will only be loaded once. If you use ''require_dependency'' instead, it will behave like the other classes do.