Skip to content

Error: Different defined default values #358

Open
@MichaelA59

Description

@MichaelA59

I get the following error in my console.

Both Coach and its :current_joyride_bot_message machine have defined a different default for "current_joyride_bot_message". Use only one or the other for defining defaults to avoid unexpected behaviors.

It's showing up all the time and I don't know why. As you can see below, the default value for this attribute is identical to where the state machine begins, so I don't understand the meaning of this error. I would like to find a way to get rid of it, or if something is truly incorrect here, fix it.

From the Schema for coaches table

t.integer  "current_joyride_bot_message",       default: 1

From Coach model where the state machine resides

state_machine :current_joyride_bot_message, initial: 1 do
    event :next_joyride_step do
      transition 1 => 2, 2 => 3, 3 => 4, 4 => 5, 5 => 6, 6 => 7, 7 => 8, 8 => 9, 9 => 10, 10 => 11, 11 => 12, 12 => 13
    end
  end

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