Skip to content

Commit

Permalink
Merge branch 'hotfix/0.9.2' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
thornomad committed May 3, 2021
2 parents 86145b7 + b68eb7e commit 267ce7c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions lib/enumbler/enumble.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ def initialize(enum, id, label: nil, label_column_name: :label, **attributes)
@label_column_name = label_column_name
@label = (label_col_specified? ? attributes[label_column_name] : label) || enum.to_s.dasherize
@additional_attributes = attributes || {}
@additional_attributes.merge!({ label: label }) if label_col_specified?
@additional_attributes.merge!({ label: label }) unless label.nil?
end

def ==(other)
Expand All @@ -21,7 +21,6 @@ def ==(other)

def attributes
hash = { id: id, label_column_name => label }
hash.merge!({ label: @additional_attributes[:label] }) if label_col_specified?
@additional_attributes.merge(hash)
end

Expand Down
2 changes: 1 addition & 1 deletion lib/enumbler/version.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# frozen_string_literal: true

module Enumbler
VERSION = "0.9.1"
VERSION = "0.9.2"
end

0 comments on commit 267ce7c

Please sign in to comment.