In my view, I've got the following condition:

  <% if current_page? :controller => 'deals', :action => 'foobar' %>
      woot
    <% end %>

My route looks like:

map.fobar '/:city.:format', :controller => 'deals', :action =>
'foobar', :defaults => { :format => 'html' }

However, the conditions succeeds if I do:

<%= active_if { current_page? :controller => 'deals', :action =>
'todays_deal', :format => 'html' } %>

Why do I need to pass :format => 'html'?

On another page I have:

route: map.resources :deals

<%= if current_page? :controller => 'deals', :action => 'index' %>,
without :format => 'html', the condition also succeeds.

So why is it failing with deals#foobar ?

-- 
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-t...@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