Skip to content

'Event' naming collision #123

@alexhanh

Description

@alexhanh

I have an Event model in my Rails project and I do this:

  def event_fired(current_state, new_state, event)
    Event.create!(type: "s.#{event}", transfer: self)
  end

with this, it throws undefined method 'create!' for Transitions::Event:Class. It seems it tries to use Transitions::Event instead of my Event model.

Is there any clean way to fix this?

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