Skip to content

Conversation

@woodhull
Copy link

In our product we have a model that has an optional state machine. The state_machine method returns nil for instances where no state_machine is appropriate / the state machine functionality is not relevant.

This method was causing an exception when the instance was reloaded. It's fixed with this safe navigation operator.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant