Skip to content

Commit

Permalink
rubocop
Browse files Browse the repository at this point in the history
  • Loading branch information
iBug committed Sep 1, 2018
1 parent e3e6198 commit a78e531
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Rakefile
Expand Up @@ -3,6 +3,6 @@
# Add your own tasks in files placed in lib/tasks ending in .rake,
# for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.

require File.expand_path('config/application', __dir__)
require File.expand_path('../config/application', __FILE__)

Rails.application.load_tasks
2 changes: 1 addition & 1 deletion app/controllers/posts_controller.rb
Expand Up @@ -189,7 +189,7 @@ def cast_spam_flag
user_id: current_user.id,
post_id: @post.id)

feedback.save || flash[:danger] = 'Unable to save feedback. Ping Undo.'
flash[:danger] = 'Unable to save feedback. Ping Undo.' unless feedback.save

if current_user.api_token.blank?
flash[:warning] = 'You must be write-authenticated to cast a spam flag.'
Expand Down

0 comments on commit a78e531

Please sign in to comment.