-
Notifications
You must be signed in to change notification settings - Fork 4
Parsing error: no implicit conversion of Symbol into Integer #30
Copy link
Copy link
Open
Labels
Description
Hi @arturictus,
nice mapper, recently I had this error:
TypeError: no implicit conversion of Symbol into Integer
File "/ruby-app/vendor/bundle/ruby/2.3.0/gems/hash_map-0.4.0/lib/hash_map/mapper.rb" line 52 in []
File "/ruby-app/vendor/bundle/ruby/2.3.0/gems/hash_map-0.4.0/lib/hash_map/mapper.rb" line 52 in block in get_value_from_key
File "/ruby-app/vendor/bundle/ruby/2.3.0/gems/hash_map-0.4.0/lib/hash_map/mapper.rb" line 50 in each
File "/ruby-app/vendor/bundle/ruby/2.3.0/gems/hash_map-0.4.0/lib/hash_map/mapper.rb" line 50 in inject
File "/ruby-app/vendor/bundle/ruby/2.3.0/gems/hash_map-0.4.0/lib/hash_map/mapper.rb" line 50 in get_value_from_key
File "/ruby-app/vendor/bundle/ruby/2.3.0/gems/hash_map-0.4.0/lib/hash_map/mapper.rb" line 26 in get_value
File "/ruby-app/vendor/bundle/ruby/2.3.0/gems/hash_map-0.4.0/lib/hash_map/mapper.rb" line 12 in block in output
File "/ruby-app/vendor/bundle/ruby/2.3.0/gems/hash_map-0.4.0/lib/hash_map/mapper.rb" line 11 in each
File "/ruby-app/vendor/bundle/ruby/2.3.0/gems/hash_map-0.4.0/lib/hash_map/mapper.rb" line 11 in output
File "/ruby-app/vendor/bundle/ruby/2.3.0/gems/hash_map-0.4.0/lib/hash_map/base.rb" line 28 in output
Here is my mapper:
class HotelSegmentMapper < BaseMapper
....
property :name, from: [:property_name, :hotel_name]
...
end
And my run case is when property_name is just a string and not hash type.
Maybe can be good to have another error message to notice this error.
Thanks!
Reactions are currently unavailable