diff --git a/app/controllers/admin/invitations_controller.rb b/app/controllers/admin/invitations_controller.rb index dd4bffc72..c64fe963d 100644 --- a/app/controllers/admin/invitations_controller.rb +++ b/app/controllers/admin/invitations_controller.rb @@ -12,7 +12,7 @@ module Admin email = params.dig(:user, :email) name = params.dig(:user, :name) - if User.exists?(["lower(email) = ? AND registered = ?", email, true]) + if User.exists?(email: email.downcase, registered: true) flash[:error] = "Invitation was not sent. There is already a registered user with the email: #{email}" redirect_to admin_invitations_path return diff --git a/app/controllers/buffer_updates_controller.rb b/app/controllers/buffer_updates_controller.rb index 9b3898712..72111e524 100644 --- a/app/controllers/buffer_updates_controller.rb +++ b/app/controllers/buffer_updates_controller.rb @@ -7,7 +7,6 @@ class BufferUpdatesController < ApplicationController create_main_tweet create_satellite_tweets create_facebook_post - @article.update(last_buffered: Time.current) redirect_back(fallback_location: "/mod") end