Skip to content
This repository was archived by the owner on Oct 19, 2018. It is now read-only.
This repository was archived by the owner on Oct 19, 2018. It is now read-only.

Support for ActiveRecord enums #98

@mpantel

Description

@mpantel

I have an activerecord column of the enum type.

I get an "Exception raised while saving - FloatDomainError: NaN" error on the js console on save just before the model.save promise resolves.

Data persists in database and the promise never resolves(succeeding or failing...)

class WithEnum < ApplicationRecord
  enum  some_attribute: {first: 0, second: 1, third: 2}
end

and in the component i have:

an_object = WithEnum.new
an_object.some_attribute = 1
an_object.save. then { alert 'saved' }.fail { alert 'failed' }

an_object.save -> persist the object and raises in js console

"then" or "fail" part never executes.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions