Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@alto
Copy link
Member

@alto alto commented Jun 19, 2016

Based on #366, this PR sets the default whiny_persistence setting to true (DSL/behavior change). So, by default, transition! will fail if the object is invalid.

  • change default to true
  • document configuration option

@alto alto changed the title let whiny_peristence: true be the default now let whiny_persistence: true be the default now Aug 24, 2016
alto added a commit that referenced this pull request Aug 24, 2016
@alto alto added this to the 5.0 milestone Aug 24, 2016
@andyw8
Copy link

andyw8 commented Oct 26, 2017

I'm confused, the changelog says for v3.0.0:

whiny transactions: by default, raise an exception if an event transition is not possible

Which seems to not be the case, since this PR is open?

@swrobel
Copy link
Contributor

swrobel commented Apr 19, 2018

@andyw8 whiny_transitions != whiny_persistence https://github.com/aasm/aasm/blob/v4.12.3/lib/aasm/base.rb#L18

@swrobel
Copy link
Contributor

swrobel commented Dec 4, 2019

@alto any reason why 5.0 was released without this? Also, I'm curious why the bump to 5.x if it seems like there weren't breaking changes...

@anilmaurya anilmaurya modified the milestones: 5.0, 6.0 Dec 5, 2019
@anilmaurya
Copy link
Member

@swrobel We bumped to 5.x because of internal architecture change in AASM

@AlexanderZagaynov
Copy link

AlexanderZagaynov commented Nov 26, 2020

Is there a way to set it by default on app load/init stage with the current version?

@anilmaurya anilmaurya added aasm6 Part of major version 6 and removed aasm5 Part major version 5 labels Nov 30, 2020
tamaloa added a commit to tamaloa/aasm that referenced this pull request Jan 13, 2022
As many before we have been bitten by the default behaviour of bang events to NOT raise exceptions.
It took me quite a while to figure out why this does not work as expected as first search results only returned eferences which state that raising an exception has been "fixed" (for instance aasm#262).

Only after quite a while I found out, that raising exceptions on bang events by default will only be part of aasm version 6 (aasm#378).

I hope the small documentation change will help others.
@route
Copy link

route commented Sep 8, 2023

👍🏻 should be by default true

@danielvdao
Copy link
Contributor

@anilmaurya is there any reason this shouldn't be merged?

@afuno
Copy link

afuno commented Apr 21, 2025

Hello. Is there any information on when this change will be released?

@alto alto changed the title let whiny_persistence: true be the default now Let whiny_persistence: true be the default now Jun 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

aasm6 Part of major version 6 dsl change persistence

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants