Problems with rails 1.2 routing

Right now I have a method like this:

def estados
respond_to do |format|
format.html
format.xls do
# generate xls and send it with send_data
end
end
end

in my routes.rb I’ve changed the default route to this:

map.connect ‘:controller/:action/:id.:format’

And in environment.rb, I added this line:

Mime::Type.register “application/vnd.ms-excel”, :xls

However, when I use the new default route, none of my
controllers/actions is recognized, and I get this error:

Routing Error
no route found to match “/informes/estados” with {:method=>:get}

What’s the right way to use the respond_to method?
Thanks for any tip.

Regards,
Rolando.-

Rolando:

When I switched to rails 1.2.1, I got the same error message for
pages using the default routes. Are you seeing the same no route
found error on other pages? Are you using any symbolic links in your
application? If so, check out this ticket: http://dev.rubyonrails.org/
ticket/6755

Hope it helps,

-Anthony

It explains that the RAILS_ROOT

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs