Skip to content

Instantly share code, notes, and snippets.

@some1else
Created June 21, 2009 13:40
Show Gist options
  • Save some1else/133510 to your computer and use it in GitHub Desktop.
Save some1else/133510 to your computer and use it in GitHub Desktop.
class Project < AR::B
has_many :comments, :as => :commentable
end
class Comment < AR::B
belongs_to :commentable
end
- form_for :project do |project_form|
/ fields_for :comment doesn't work :-S
- project_form.fields_for :comment_attributes do |comment_form|
= render :partial => "comments/form", :locals => {:f => comment_form}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment