Skip to content

Support JSON.mapping better #44

Description

@waterlink

Currently, JSON.mapping overrides .new({ ... => ... }) constructor with its own.

Workaround for now is to do:

class Post < ActiveRecord::Model
  # ...

  def initialize(h : Hash)
    super(h)
  end

  JSON.mapping({ ... })
end

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