7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
# File 'app/controllers/talkie/comments_controller.rb', line 7
def create
@comment = Talkie::Comment.new()
@comment.creator = current_user
respond_to do |format|
if @comment.save
if reply?
format.html { redirect_to Talkie.success_redirect_to.call(main_app, @comment.),
notice: t('talkie.controllers.comments.flash.success') }
format.js
else
format.html { redirect_back fallback_location: Talkie.fail_redirect_to.call(main_app),
notice: t('talkie.controllers.comments.flash.error') }
format.js
end
end
end
|