Skip to content

Issue when having a enum field named :format #3324

@sebfie

Description

@sebfie

Hello,

I found an issue in this gem, I have a model with an enum field :format

FORMATS = %w[s m l xl xxl].freeze
enum format: FORMATS

When doing on the show view of one of this item I have the error :

too few arguments here https://github.com/sferik/rails_admin/blob/v2.0.2/lib/rails_admin/config/fields/types/active_record_enum.rb#L19

It comes from using send(:format) instead of .format which works.

I think the private method format is defined somewhere.

Maybe same issue as this ?

thoughtbot/factory_bot#279

Thank you

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions