Skip to content

Instantly share code, notes, and snippets.

@stuffness
Created November 10, 2011 12:22
Show Gist options
  • Save stuffness/1354736 to your computer and use it in GitHub Desktop.
Save stuffness/1354736 to your computer and use it in GitHub Desktop.
#Trying to have my root behave like my timers controller,
#so I wouldn't have to prefix everything with 'timers/' in the URLs
#resources :timers
root to: "timers#index", as: :timers
match '/:id' => 'timers#show', as: :timer
match '/new' => 'timers#new', as: :new_timer
# When I do this:
# index link: works
# show link: works
# new link: doesn't work - results in a 302 redirect to "/"
# delete link: doesn't work - reloads the page but doesn't delete the record
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment