marcschuetze-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
2006-Sep-11 00:16 UTC
need to restart Webrick each time I change my model
Hi, I''m new to rails and I''m following along the depot sample application in Agile Web Development with Rails>From what I understand I should not need to restart the server aftermaking changes to the model as long as I am in dev mode. I got stuck on the part where you need to update the add_product function in cart.rb in order for it to not insert the same product twice but just increase the quantity. For about an hour I was wondering why nothing changed and I tried all sorts of stuff until I decided to give restarting the server a try. And that did the trick But isn''t that unnecessarry when running in dev mode? thanks Marc --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Aaron Baldwin
2006-Sep-11 00:42 UTC
Re: need to restart Webrick each time I change my model
In development mode you don''t need to restart the server when you make changes to your controllers or views. But you do need to restart the server when you change a model. Aaron On Sep 10, 2006, at 6:16 PM, marcschuetze-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org wrote:> > Hi, > > I''m new to rails and I''m following along the depot sample application > in Agile Web Development with Rails > >> From what I understand I should not need to restart the server after > making changes to the model as long as I am in dev mode. > > I got stuck on the part where you need to update the add_product > function in cart.rb in order for it to not insert the same product > twice but just increase the quantity. > > For about an hour I was wondering why nothing changed and I tried all > sorts of stuff until I decided to give restarting the server a try. > And > that did the trick > But isn''t that unnecessarry when running in dev mode? > > thanks > Marc > > > >--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
in model , make sure you include Reloadable or is subclass of ActiveRecord::Base(which include Reloadable). On 9/11/06, Aaron Baldwin <baldwina-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > In development mode you don''t need to restart the server when you > make changes to your controllers or views. But you do need to > restart the server when you change a model. > > Aaron > > On Sep 10, 2006, at 6:16 PM, marcschuetze-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org wrote: > > > > > Hi, > > > > I''m new to rails and I''m following along the depot sample application > > in Agile Web Development with Rails > > > >> From what I understand I should not need to restart the server after > > making changes to the model as long as I am in dev mode. > > > > I got stuck on the part where you need to update the add_product > > function in cart.rb in order for it to not insert the same product > > twice but just increase the quantity. > > > > For about an hour I was wondering why nothing changed and I tried all > > sorts of stuff until I decided to give restarting the server a try. > > And > > that did the trick > > But isn''t that unnecessarry when running in dev mode? > > > > thanks > > Marc > > > > > > > > > > > >-- Best Regards femto http://femto.blogdriver.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 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 -~----------~----~----~----~------~----~------~--~---