Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class CommentsController < .....
- inherit_resources
- belongs_to :a, :b, :c, :d, :polymorphic => true
- def create
- @comment = **parent**.comments.new(params[:comment])
- @comment.author = current_user
- create! do
- .........
- end
- end
- end
Add Comment
Please, Sign In to add comment