MorningPeak/app/controllers/concerns/commentable_form.rb
Arthur Poulet d57ba8ad44 add comment form for client
- create controller concern commentable_form to use
  "prepare_commentable_for"
- implement it in each controller
- implement form to clients/show
2015-07-28 01:33:13 +02:00

9 lines
140 B
Ruby

module CommentableForm
def prepare_comment_for(commentable)
@comment = Comment.new
@comment.commentable = commentable
end
end