Update and update_attribute woes

i can not get update to work via controller/server.

it works via console ???

this is what i get when i run it

Club Load (0.005893) SELECT * FROM clubs WHERE (clubs.“id” = 3)
SQL (0.000570) BEGIN
SQL (0.000454) COMMIT

club.update_attributes(:state => "CA")

or

Club.update(3, :state => "CA")

what am i overlooking?

Although you neither show nor mention any errors from your log, consider
these two points. First, AR::Base#update_attributes returns false if the
save fails any validations; check its return value. Second,
AR::Base.update
returns the object whether save is successful or not; check it by
calling
club.valid?. Other than that, I think you’d have to post the code that
you’re using in the controller to update the club and the code that you
use
successfully in the console.
Regards,
Craig

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs