Tom Lea
2008-Oct-28 16:05 UTC
Named Routes in ActionView Scope Don''t Respect AC::Base#default_url_options
I have the following test case in url_helper_test.rb (test patch for
reference should be attached)
def
test_named_route_should_show_host_and_path_using_controller_default_url_options
class << @controller
def default_url_options(options = nil)
{:host => ''testtwo.host''}
end
end
with_url_helper_routing do
get :show_named_route, :kind => ''url''
assert_equal
''http://testtwo.host/url_helper_with_controller/show_named_route''
, @response.body
end
end
This fails, while similar test (in the second patch file) against
action controller directly seem to work ok.
Is this expected behavior?
-- Tom + Chris Roos
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Core" group.
To post to this group, send email to rubyonrails-core@googlegroups.com
To unsubscribe from this group, send email to
rubyonrails-core+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/rubyonrails-core?hl=en
-~----------~----~----~----~------~----~------~--~---
Michael Koziarski
2008-Oct-30 09:59 UTC
Re: Named Routes in ActionView Scope Don''t Respect AC::Base#default_url_options
> This fails, while similar test (in the second patch file) against > action controller directly seem to work ok. > > Is this expected behavior?This isn''t consistent with what I see in an application I''m working on at present. Could you please open a lighthouse ticket with these patches / test cases attached so people can investigate a little more. -- Cheers Koz --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to rubyonrails-core@googlegroups.com To unsubscribe from this group, send email to rubyonrails-core+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en -~----------~----~----~----~------~----~------~--~---
Eloy Duran
2008-Oct-30 10:58 UTC
Re: Named Routes in ActionView Scope Don''t Respect AC::Base#default_url_options
> This isn''t consistent with what I see in an application I''m working on > at present. Could you please open a lighthouse ticket with these > patches / test cases attached so people can investigate a little more.Second that. And could you add the output of the failure as well? Cheers, Eloy --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to rubyonrails-core@googlegroups.com To unsubscribe from this group, send email to rubyonrails-core+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en -~----------~----~----~----~------~----~------~--~---
Tom Lea
2008-Oct-30 18:12 UTC
Re: Named Routes in ActionView Scope Don''t Respect AC::Base#default_url_options
Ticket raised: http://rails.lighthouseapp.com/projects/8994-ruby-on-rails/tickets/1301 Also have a patch to fix it too... just not 100% sure it''s the best thing to do. Thanks in advance guys! On 30 Oct 2008, at 10:58, Eloy Duran wrote:> >> This isn''t consistent with what I see in an application I''m working >> on >> at present. Could you please open a lighthouse ticket with these >> patches / test cases attached so people can investigate a little >> more. > > Second that. And could you add the output of the failure as well? > > Cheers, > Eloy > > >--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to rubyonrails-core@googlegroups.com To unsubscribe from this group, send email to rubyonrails-core+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en -~----------~----~----~----~------~----~------~--~---