Skip to content

Commit

Permalink
No need for to_sym here, already a symbol
Browse files Browse the repository at this point in the history
  • Loading branch information
shioyama committed May 22, 2018
1 parent 787438d commit e5bacca
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/mobility/backends/sequel/query_methods.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ class QueryMethods < Module
def initialize(attributes, _)
@attributes = attributes.map(&:to_sym)

attributes.each do |attribute|
@attributes.each do |attribute|
define_method :"first_by_#{attribute}" do |value|
where(attribute.to_sym => value).select_all(model.table_name).first
where(attribute => value).select_all(model.table_name).first
end
end
end
Expand Down

0 comments on commit e5bacca

Please sign in to comment.