Created
July 9, 2009 04:23
-
-
Save Jeraimee/143426 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Partial for 'new comment' derived from http://railscasts.com/episodes/154-polymorphic-association | |
# | |
<% form_for [@commentable, Comment.new] do |f| %> | |
<%= f.error_messages %> | |
<p> | |
<%= f.label :content %><br /> | |
<%= f.text_area :content %> | |
</p> | |
<p><%= f.submit "Submit" %></p> | |
<% end %> | |
# Error is: undefined method `comments_path' for #<ActionView::Base:0x2332ec4> | |
# routes.rb contains (for each model that has comments): | |
# | |
map.resources :cities, :has_many => :comments | |
# and still the default: | |
# | |
map.connect ':controller/:action/:id' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment