Skip to content

Commit

Permalink
rubocop suggestions
Browse files Browse the repository at this point in the history
  • Loading branch information
Martin Fenner committed Dec 18, 2019
1 parent 2c29dee commit d03aa60
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion app/controllers/application_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ def authenticate_user_with_basic_auth!

def authenticate_user!
type, credentials = type_and_credentials_from_request_headers
return false unless credentials.present?
return false if credentials.blank?

@current_user = User.new(credentials, type: type)
end
Expand Down
4 changes: 2 additions & 2 deletions app/controllers/clients_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ def create
end

def update
if @client.update_attributes(safe_params)
if @client.update(safe_params)
options = {}
options[:meta] = { dois: doi_count(client_id: params[:id]) }
options[:is_collection] = false
Expand All @@ -142,7 +142,7 @@ def destroy
status = 400
logger.warn message
render json: { errors: [{ status: status.to_s, title: message }] }.to_json, status: status
elsif @client.update_attributes(is_active: nil, deleted_at: Time.zone.now)
elsif @client.update(is_active: nil, deleted_at: Time.zone.now)
@client.send_delete_email unless Rails.env.test?
head :no_content
else
Expand Down

0 comments on commit d03aa60

Please sign in to comment.