Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

:new state conflicts with ActiveRecord

#8

Since AASM is creating ActiveRecord named scopes, it will overwrite the model's 'new' method if you have a state named 'new', and thus will probably break your app. This was quite confusing for me, especially since the example in the README has a state named 'new' too.

At the very least the state in the example should be renamed. It would be even better if AASM would issue a warning or raise an exception before overriding a built-in method.

Reported by Zoltan Varady · October 9th, 2008 @ 10:36 AM

State: new
Milestone: none
Assigned to: Scott Barron Scott Barron

Activity

  1. rubyist
    rubyist

    Indeed this is the case - I will add warnings for overridden methods as well as changing the example.

    Thanks -Scott

    On Oct 9, 2008, at 10:36 AM, Lighthouse wrote:

    October 9th, 2008 @ 11:50 AM

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.