Hi,
Rails 3.0.3
We''re having some trouble with locale + scope and the auto-generated
helpers. We''ve got a simple routes file like this:
scope ''(:locale)'', :locale => /en|es/ do
resources :schools
end
And in our view:
<%= link_to @site.schoolid, school_url(@site.school), :target =>
"_blank" %>
But, instead of assigning passing @site.school as the :id, it''s
getting picked up as the value to a :locale key:
test_notification_is_delivered(SomeMailerTest):
ActionView::Template::Error: No route matches
{:controller=>"schools", :locale=>#<School id: 254, ...
We can workaround by using an explicit hash parameter, i.e.
school_url(:id => @site.school), but it seems like that shouldn''t be
necessary.
What are we doing wrong here?
Regards,
Dan
--
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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.