Closed benzelano closed 13 years ago
Gareth Adams commented
Sorry, to be clear:
@@@ ruby
Rails.version => "2.3.5" @@@
Hey Gareth -
You’re right, this is pretty elementary and it’s unclear what’s going on. Can you try this is a basic Rails app with no other plugins installed and tell me if you see the same problem? Without a better understanding of what other app environment variables are in play, it’ll be difficult to debug the issue.
For what it’s worth, I can’t reproduce this issue on Ruby 1.8.7 / 1.9.1, Rails 2.3.5, and state_machine 0.9.3.
Gareth Adams commented
Hey,
Sorry, I just realised this is a machine with Ruby 1.8.5 on it. I’ve now taken the opportunity to upgrade to 1.8.7 (which should have happened a long time ago) and everything works fine.
If you’re still interested in looking at it despite it being an ancient version of Ruby, The problem appeared with the first model I created in a brand new Rails project with no other plugins installed.
Ah, that would explain it. I’m only supporting 1.8.6 and up. Thanks for the info, though!
Gareth Adams opened this issue
Now, I don’t really think this is a bug in state_machine because it seems pretty elementary, but using any kind of state_machine in my AR models seem to stop attributes being assigned when set through the class constructor.
The only thing I’m adding is the state_machine line - and I get the same result if I add states/events too:
@@@ ruby
Before
@@@
original LH ticket
This ticket has 0 attachment(s).