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.

This project is archived and is in readonly mode.

undefined method 'remove_attributes_protected_from_mass_assignment'

#5217

Please ignore this ticket

It was an issue i had with state_machine and was quickly resolved by the gem owner.

When creating a new object im getting this error in a controller.

Ive tested it with no filters and no attributes being assigned to it.

Reported by Adrian · July 27th, 2010 @ 06:00 PM

State: invalid
Milestone: none
Assigned to: nobody
Importance: Low

Activity

  1. Adrian
    Adrian

    I figured it out. I was using state machine in the model and that tries to access the 'remove_attributes_protected_from_mass_assignment' method.

    I am having the same problem with the factory girl gem. Do you have any recommendation on steps to take to make these work again?

    July 27th, 2010 @ 06:19 PM

  2. Trevor Rosen
    Trevor Rosen

    Having the same issue -- model-based transitions breaking as well as original assignments in FactoryGirl-based fixtures.

    July 28th, 2010 @ 04:19 PM

  3. Keeran
    Keeran

    Adrian: please can you post whatever fix / solution you worked out with the gem owner? In the process of upgrading an app from beta3 -> rc1 and have hit the same problem.

    Many thanks,

    K

    July 28th, 2010 @ 08:14 PM

  4. Keeran
    Keeran

    Suspect this is what we need to change in state_machine, just wondering how you went about it:

    http://github.com/klacointe/state_machine/commit/da21e98dad6199050c...

    July 28th, 2010 @ 08:17 PM

  5. Keeran
  6. Adrian
    Adrian

    Hey there.

    Sorry, did not cache your comment earlier. The problem with state machine was cascading in to factory girl so if you update to use the state_machine's master branch from github in your gemfile it should work fine.

    Thanks for linking to the fix though.

    July 28th, 2010 @ 09:06 PM

  7. Rohit Arondekar
    Rohit Arondekar
    • State changed from new to invalid
    • Importance changed from to Low

    July 29th, 2010 @ 02:45 AM

  8. Jeff Kreeftmeijer