Skip to content

Instantly share code, notes, and snippets.

@jackdempsey
Created June 4, 2012 17:45
Show Gist options
  • Select an option

  • Save jackdempsey/2869781 to your computer and use it in GitHub Desktop.

Select an option

Save jackdempsey/2869781 to your computer and use it in GitHub Desktop.
= form_for @list do |f|
no routes matches /lists
= form_for @list, url: (@list.new_record? ? lists.lists_path : lists.list_path(@list) do |f|
@drogus
Copy link
Copy Markdown

drogus commented Jun 4, 2012

err, form_for [lists, @list] (the first array element is helper for mounted routes)

@jackdempsey
Copy link
Copy Markdown
Author

Awesome, the one thing I didn't try. Makes sense. TY sir!

@drogus
Copy link
Copy Markdown

drogus commented Jun 4, 2012

No problem :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment