Repository is archived
No commit activity in last 3 years
No release in over 3 years
This gem provides an extraction of the DeprecatedMapper from Rails 3.0. If you have a legacy application with an old style routes.rb file this allows you to get your application running quickly in Rails 3.1.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 0.4.0
~> 0.12.0

Runtime

 Project Readme

Rails Legacy Mapper

Build Status Dependency Status

This gem provides an extraction of the DeprecatedMapper from Rails 3.0. If you have a legacy application with an old style routes.rb file this allows you to get your application running quickly in Rails 3.1.

Example

The trigger for using the legacy mapper is the arity (number of args) of the block passed to draw, e.g:

LegacyApp::Application.routes.draw do |map|

  map.root :controller => 'pages', :action => 'index'

  map.namespace :admin do |admin|
    admin.resources :pages
  end

  map.page '/pages/:id', :controller => 'pages', :action => 'show'

  map.connect '/:controller/:action/:id/'

end

License

Copyright (c) 2011 Andrew White, released under the MIT license