Skip to content

Better errors, not allowed option #22

@arturictus

Description

@arturictus

When wrong use of the library

 module Worldmate
  class HotelToBaobabMapper < HashMap::Base
    property :hotel_name, key: :name
    from_child :address do
      property :street, key: :address
      property :phone, key: :telephone
      property :postal_code, key: :zip
      properties :city, :country_code
    end
  end
end

the error:
NoMethodError: undefined method `reverse' for :name:Symbol

the good syntax is:

property :name, from: :hotel_name

But the error should help better to know what is happening

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions