Skip to content

Instantly share code, notes, and snippets.

@jdickey
Last active December 15, 2015 23:49
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 jdickey/5343105 to your computer and use it in GitHub Desktop.
Save jdickey/5343105 to your computer and use it in GitHub Desktop.
New contribution form with a problem: `binding.pry` at line 13 fires and all paths are OK; line 14 never executes. Error reported is Failure/Error: render ActionView::Template::Error: No route matches {:controller=>"contributions", :action=>"new"} and points to the start of the `simple_form_for` block. Ideas?
%h1 New contribution
= simple_form_for(new_article_contribution_path(@contribution.article)) do |f|
= f.error_notification
.form-inputs
.form-actions
= f.button :submit
- it_matches = new_article_contribution_path(@contribution.article) == "/articles/1/contributions/new"
- it_matches2 = article_contributions_path(@contribution.article) == '/articles/1/contributions'
- binding.pry
- binding.pry
= link_to 'Back', article_contributions_path(@contribution.article)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment