Class: CommentsController
- Inherits:
-
ApplicationController
- Object
- ActionController::Base
- ApplicationController
- CommentsController
- Defined in:
- app/controllers/comments_controller.rb
Instance Method Summary collapse
Instance Method Details
#create ⇒ Object
4 5 6 7 8 9 10 11 12 13 14 15 16 |
# File 'app/controllers/comments_controller.rb', line 4 def create @comment = Comment.new( comment_params.merge(user: current_user) ) if @comment.save @ticket = @comment.ticket @activity = @ticket.create_activity key: "ticket.create_comment", owner: current_user, recipient: @comment end respond_to do |format| format.js end end |