render_component :controller => "poll", :action => :show, :id => @event.poll
It ends up that this would be all fine and dandy if it was a call to link_to() rather than render_component even though the nature of the parameters is practically the same. So for render_component(), it should be:
render_component :controller => "poll", :action => "show", :id => @event.poll.id
it needs strings instead of symbols for :action, and it doesn't convert an ActiveRecord object to its id--it needs to be explicitly stated.
No comments:
Post a Comment