documentcloud / jammit

Industrial Strength Asset Packaging for Rails
http://documentcloud.github.com/jammit/
MIT License
1.16k stars 197 forks source link

routes deprecation warning in rails 3 #150

Closed olistik closed 13 years ago

olistik commented 13 years ago

In my config/routes.rb file I had to pass the map variable to the main block in order to support the route generation of Jammit:

MyApp::Application.routes.draw do |map|
  Jammit::Routes.draw(map)
end

But this seems to be deprecated as stated in the logs that my application generates for every request:

DEPRECATION WARNING: You are using the old router DSL which will be removed in Rails 3.1. Please check how to update your routes file at: http://www.engineyard.com/blog/2010/the-lowdown-on-routes-in-rails-3/. (called from <top (required)> at /pathTo/MyApp/config/routes.rb:1)
vandrijevik commented 13 years ago

Maurizio, per http://documentcloud.github.com/jammit/#installation (step 3) editing config/routes.rb is not necessary in Rails 3, as the appropriate route is loaded automatically.

Just remove the line from config/routes.rb and you should be good to go!

olistik commented 13 years ago

I've misunderstood that step :) thx!