[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

problems updating the database entries

Depili

1/13/2006 3:01:00 PM

for some reason my code refuses to update the database entries and
doesn't even give any errors, the code is as follows:

def update
@team=Team.find(params[:id])
if @team.update_attributes(params[:team])
flash[:notice] = @team.attributes
end
end

The flash message displays all the fields with up-to-date values, but
nothing gets updated on the mysql database, also no errors are
produced.

I have tried using @team.attributes=(params[:team]) and @team.update
but with same results. elsewhere I have been using @team.update without
problems (in the create method, as I need the id to calculate some
fields).

Any ideas what might cause the update to fail without any errors?