Improve Rails 3 route processing #116

merged 11 commits into from Jul 25, 2012

2 participants


This patch fixes some issues with Rails 3 route processing.

Improvements include:

  • Handling "controller" blocks
controller :whatever do
  get :something => :else
  • Handling routes that don't specify a controller
resource :book do
  get :reserve
  • Handling :to options in match
match 'path', :to => 'controller#action'
  • Handling :to options in blocks
resource :book do
  get 'reserve', :to => :checkout
@oreoshake oreoshake commented on the diff Jul 25, 2012
def process_resources_block exp
- process_resources exp[1]
oreoshake Jul 25, 2012

alias :process_resources_block, :process_resource_block?

presidentbeef Jul 25, 2012 Owner

They are slightly different...


code climate is making me overthink this, but yeah, 👍

@presidentbeef presidentbeef merged commit 57c2672 into master Jul 25, 2012
@presidentbeef presidentbeef deleted the improve_rails3_route_processing branch Feb 25, 2015
@presidentbeef presidentbeef locked and limited conversation to collaborators Feb 16, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.