I have a need to get routes into my AR models, but I can not find the
module that provides them to ActionController. For example, I would
like to provide an event feed from two different locations, so want to
do something like this;
xml.instruct! :xml, :version => ''1.0''
xml rss stuff
@events.each do |event|
event.to_rss(xml)
end
Event.rb
def to_rss(xml)
xml.item do
xml.link(event_url(self))
xml.guid(event_url(self))
end
end
but AR (rightly) doesn''t know how to do event_url() Where does it
come from?
Thanks,
--Dean
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---