Skip to content

Translating a delegated enum #121

@Startouf

Description

@Startouf
Class Student
  delegate :type, to: school, prefix: :true
end

class School
  include SimpleEnum::Mongoid
  as_enum :type, [:business, :technical]
end

te(@student, school_type) # Doesn't seem to work

Taking care of delegated stuff can become pretty nasty I suppose... here the translation should propagate from the Student to the School model.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions