Skip to content

Instantly share code, notes, and snippets.

@zarkomilosevic
Last active August 31, 2017 20:16
Show Gist options
  • Save zarkomilosevic/1c297c33197ee83267332559e8d5cdbc to your computer and use it in GitHub Desktop.
Save zarkomilosevic/1c297c33197ee83267332559e8d5cdbc to your computer and use it in GitHub Desktop.
todomvc rails CRUD routes
Rails.application.routes.draw do
root 'todos#index'
resources :todos, only: [:index, :create, :update, :destroy] do
member do
put :toggle
end
collection do
put :toggle_all
get :get_all
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment