Welcome to Working With Rails

 

Discussion Forums

Discuss all things Ruby on Rails with perhaps the web's most vibrant group of Ruby on Rails enthusiasts.
Routes problem after upgrading to rails 2.2.2
1 Post
Routes problem after upgrading to rails 2.2.2

Hi there,

Since I've upgraded to rails 2.2.2, I'm having problems with the line where the li is situated (dutch_subpage_path).

[code] def get_subnavigation(content)

 markaby do
          div.subnav do 
            h3 "Subjects" unless content.all? {|subnav| subnav.children.empty?}
            ul  do 
               content.each do |subnav|
              if !subnav.children.empty?
                  li {(link_to_unless_current subnav.title_dutch, dutch_subpage_path(subnav.dutch_url.to_s) do "<span>" +subnav.title_dutch + "</span>" end) }
                end
              end
            end
          end unless content.all? {|subnav| subnav.children.empty?}
        end

end[/code]

My route file looks like this [code]map.dutch_subpage 'dutch/subpage/:id', :controller => 'dutch', :action => 'subpage'[/code]

The problem I'm getting is a undefined method `/dutch/subpage/9-obesitas_path.

The strange thing is that it works in a view and it isn't in a helper. Does someone know what I'm doing wrong?

1 Post
Login to add your message