Hi,
I''ve bumped into the following problem. I have two models, one
inheriting from another:
---------------------------------------------------------------
class Message < ActiveRecord::Base
...
def reply_link
[returns string]
end
end
---------------------------------------------------------------
class SpecificMessage < Message
...
end
---------------------------------------------------------------
I use single table inheritance
When I render a view that includes
....
="#{@message.reply_link}"
....
for a SpecificMessage object, it works fine once.
After that, when I try to render it for any object I get the error:
undefined method `reply_link'' for #<SpecificMessage:0xb6813948>
Is it a bug, or is there a mechanism I am not aware of?
Any help appreciated :)
Best regards,
Adam Oldak
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---