Skip to content

Instantly share code, notes, and snippets.

@hugodias
Last active October 29, 2015 19:04
Show Gist options
  • Save hugodias/86428858fab9c87e1057 to your computer and use it in GitHub Desktop.
Save hugodias/86428858fab9c87e1057 to your computer and use it in GitHub Desktop.
Erro: Couldn't find Realty with id=archived
Profit::Application.routes.draw do
root :to => 'pages#index'
resources :realties do
collection do
get "/realties/archived", to: "realties#archived"
end
end
#rake routes
# realty_versions GET /realties/:realty_id/versions(.:format) versions#index
# realty_version GET /realties/:realty_id/versions/:id(.:format) versions#show
# realties GET /realties(.:format) realties#index
# POST /realties(.:format) realties#create
# new_realty GET /realties/new(.:format) realties#new
# edit_realty GET /realties/:id/edit(.:format) realties#edit
# realty GET /realties/:id(.:format) realties#show
# PUT /realties/:id(.:format) realties#update
# DELETE /realties/:id(.:format) realties#destroy
#rake routes
#realties_archived GET /realties/archived(.:format) /realties#archived
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment