I''m adding methods to my models and for some reason all these new methods are not invisible when I call them. For example, def target_language Language.find(self.target_language_id) end def bob Language.find(self.origin_language_id) end I can call target_language, but when I call bob, I get "undefined method. But it''s exactly the same! I restarted mongrel and still every *new* method is just invisible. Why is this? --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Frederick Cheung
2007-Dec-20 15:56 UTC
Re: methods are not visible... I''m sure this is an easy one.
On 20 Dec 2007, at 15:15, Gavin wrote:> > I''m adding methods to my models and for some reason all these new > methods are not invisible when I call them. For example, > > def target_language > Language.find(self.target_language_id) > end > > def bob > Language.find(self.origin_language_id) > endI think you''re going to have to show us some more information than this. Fred> > > I can call target_language, but when I call bob, I get "undefined > method. But it''s exactly the same! I restarted mongrel and still > every *new* method is just invisible. Why is this? > >--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Mark Wilden
2007-Dec-20 17:46 UTC
Re: methods are not visible... I''m sure this is an easy one.
On Dec 20, 7:15 am, Gavin <gav...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> I''m adding methods to my models and for some reason all these new > methods are not invisible when I call them. For example,Make some kind of syntax error in target_language, then call it. That''ll at least make sure you''re changing the source you think you are. It''ll also reveal if the class is just being cached. ///ark --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Ryan Bigg
2007-Dec-20 20:06 UTC
Re: methods are not visible... I''m sure this is an easy one.
You are putting these INSIDE the class, right? --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---