Hi all, I''ve a model class Toto in the model directory. I don''t understand why i have to restarts WebBrick to view changes i make in this class FYI : in the development. rb i desabled class cache with config.cache_classes = false Regards Luciano -------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060331/a47a024c/attachment.html
Luciano Broussal wrote:> Hi all, > > I''ve a model class Toto in the model directory. > > I don''t understand why i have to restarts WebBrick to view changes i > make > in this class > > FYI : in the development. rb i desabled class cache with > > config.cache_classes = falseI believe you may have just answered your own question. :-) Alan -- Posted via http://www.ruby-forum.com/.
Thx for your response But my environement file include config.cache_classes = false This force reloading no ??? but the class is not reloaded unless i restart webbrick . Have you an other idea Thanks by advance On 3/31/06, Alan Francis <alancfrancis@gasil.com> wrote:> > Luciano Broussal wrote: > > Hi all, > > > > I''ve a model class Toto in the model directory. > > > > I don''t understand why i have to restarts WebBrick to view changes i > > make > > in this class > > > > FYI : in the development. rb i desabled class cache with > > > > config.cache_classes = false > > I believe you may have just answered your own question. :-) > > Alan > > -- > Posted via http://www.ruby-forum.com/. > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails >-- ---------------------------------- Luciano Broussal email: luciano.broussal@gmail.com T?l: 06 61 84 51 00 Fax: 04 92 72 65 91 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060331/e66c4087/attachment.html
Hi, does your model inherit from ActiveRecord::Base? If it doesn''t then it won''t get reloaded automatically and you''ll have to do a little extra work: In rails 1.0 you can put this into your app/controllers/ application.rb file: require_dependency ''toto'' And in rails 1.1 you can use the Reloadable mixin. So in app/models/ toto.rb you have: class Toto include Reloadable # the rest of your stuff here end HTH, Trevor -- Trevor Squires http://somethinglearned.com On 30-Mar-06, at 9:01 PM, Luciano Broussal wrote:> Hi all, > > I''ve a model class Toto in the model directory. > > I don''t understand why i have to restarts WebBrick to view changes > i make in this class > > FYI : in the development. rb i desabled class cache with > > config.cache_classes = false > > > Regards > > > Luciano > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails
Many thanks, it works. Thank you Trevor On 3/31/06, Trevor Squires <trevor@protocool.com> wrote:> > Hi, > > does your model inherit from ActiveRecord::Base? If it doesn''t then > it won''t get reloaded automatically and you''ll have to do a little > extra work: > > In rails 1.0 you can put this into your app/controllers/ > application.rb file: > > require_dependency ''toto'' > > And in rails 1.1 you can use the Reloadable mixin. So in app/models/ > toto.rb you have: > > class Toto > include Reloadable > # the rest of your stuff here > end > > HTH, > Trevor > -- > Trevor Squires > http://somethinglearned.com > > > > On 30-Mar-06, at 9:01 PM, Luciano Broussal wrote: > > > Hi all, > > > > I''ve a model class Toto in the model directory. > > > > I don''t understand why i have to restarts WebBrick to view changes > > i make in this class > > > > FYI : in the development. rb i desabled class cache with > > > > config.cache_classes = false > > > > > > Regards > > > > > > Luciano > > _______________________________________________ > > Rails mailing list > > Rails@lists.rubyonrails.org > > http://lists.rubyonrails.org/mailman/listinfo/rails > > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails >-- ---------------------------------- Luciano Broussal email: luciano.broussal@gmail.com T?l: 06 61 84 51 00 Fax: 04 92 72 65 91 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060331/69b7ee0e/attachment.html