Skip to content

Commit

Permalink
refactor: change to map(&:name)
Browse files Browse the repository at this point in the history
  • Loading branch information
hatsu38 committed Jul 8, 2024
1 parent fa3feb6 commit 0306858
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions lib/active_hash/base.rb
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,7 @@ def field_names
# # => ["id", "name", "code"]
#
def column_names
field_names.map do |field|
field.respond_to?(:name) ? field.name : field.to_s.freeze
end
field_names.map(&:name)
end

def the_meta_class
Expand Down

0 comments on commit 0306858

Please sign in to comment.