Skip to content

Commit

Permalink
Run rubocop
Browse files Browse the repository at this point in the history
  • Loading branch information
chvp committed Dec 17, 2023
1 parent 6993907 commit e7b9950
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions app/controllers/application_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ def add_pagination_headers(collection)
def authenticate_from_token
token = AuthToken.find_authenticated(
{
secret: (request.headers[:'x-secret'] || params[:secret]),
device_id: (request.headers[:'x-device-id'] || params[:device_id])
secret: request.headers[:'x-secret'] || params[:secret],
device_id: request.headers[:'x-device-id'] || params[:device_id]
}
)
self.current_user = token&.user
Expand Down
6 changes: 3 additions & 3 deletions app/models/concerns/has_normalized.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ module HasNormalized
class_methods do
def normalized_col_generator(col_name)
col = col_name.to_sym
normalized_col = "normalized_#{col_name}".to_sym
generate_normalized_col = "generate_normalized_#{col_name}".to_sym
col_changed = "#{col_name}_changed?".to_sym
normalized_col = :"normalized_#{col_name}"
generate_normalized_col = :"generate_normalized_#{col_name}"
col_changed = :"#{col_name}_changed?"

set_callback :validation, :before, generate_normalized_col, if: col_changed

Expand Down

0 comments on commit e7b9950

Please sign in to comment.