Skip to content
This repository was archived by the owner on Apr 26, 2019. It is now read-only.

ensure ids are always assigned as integers #14

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions lib/enum_table/reflection.rb
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ def to_populate(&block)
end

def add_value(id, value)
id = id.to_i
@strings_to_ids[value.to_s] = id

cast_value = @type == :string ? value.to_s : value.to_sym
Expand Down