I have a simple controller that takes a request, looks up some data
and then returns the results as either HTML or Atom. The HTML response
works fine, but the Atom Builder is blowing up with an undefined
method error that I can't figure out. It seems to be failing when the
ActiveRecord instance is passed to the 'entry' method and it tries to
build the URL via the 'polymorphic_url' method. There is no
'order_url' method, field or database column, so I'm at a loss.

Error message - undefined method `order_url' for #<ActionView::Base:
0x25e3560>
Code snippet that's failing (line 7) -
4:
5:   for order in @orders
6:
7:     feed.entry(order) do |entry|
8:
Stack trace of failure -
/Library/Ruby/Gems/1.8/gems/actionpack-2.3.2/lib/action_controller/
polymorphic_routes.rb:109:in `__send__'
/Library/Ruby/Gems/1.8/gems/actionpack-2.3.2/lib/action_controller/
polymorphic_routes.rb:109:in `polymorphic_url'
/Library/Ruby/Gems/1.8/gems/actionpack-2.3.2/lib/action_view/helpers/
atom_feed_helper.rb:189:in `entry'
/Library/Ruby/Gems/1.8/gems/builder-2.1.2/lib/builder/xmlbase.rb:
134:in `call'
/Library/Ruby/Gems/1.8/gems/builder-2.1.2/lib/builder/xmlbase.rb:
134:in `_nested_structures'
/Library/Ruby/Gems/1.8/gems/builder-2.1.2/lib/builder/xmlbase.rb:58:in
`method_missing'
/Library/Ruby/Gems/1.8/gems/actionpack-2.3.2/lib/action_view/helpers/
atom_feed_helper.rb:178:in `entry'

I'm running Ruby 1.8.6 on Mac OS X 10.5.7. Thanks.

--~--~---------~--~----~------------~-------~--~----~
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@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to