Skip to content

Instantly share code, notes, and snippets.

@keppy
Created July 18, 2012 00:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save keppy/3133180 to your computer and use it in GitHub Desktop.
Save keppy/3133180 to your computer and use it in GitHub Desktop.
Problem with routes
routes.rb
----------
Debateable::Application.routes.draw do
resources :users do
resources :posts
end
resources :topics do
resources :posts
end
end
----------
bundle exec rake routes:
user_propositions GET /users/:user_id/posts(.:format) posts#index
POST /users/:user_id/posts(.:format) posts#create
-----------
The first line of my form in views/posts/new.html.erb:
<%= form_for (@post) do |f| %>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment