On Tue, Dec 16, 2008 at 5:53 PM, Maulin Pathare
<[email protected]> wrote:
>
> I have having some trouble with my update statement. I have a page that
> allows users to change their personal information (name,
> password...etc), The update statement seems to execute successfully but
> does not update anything. What am I missing?

>  def update
>    Player.update(params[:id],
>    {:first_name => params[:first_name],

Per the api doc, ActiveRecord::Base.update
"Updates an object (or multiple objects) and saves it to the database,
if validations pass. The resulting object is returned whether the object
was saved successfully to the database or not."

Are you logging validation errors on this? If not, or just for grins, you
might change the controller to Player.update_attributes! to try to make
the error visible...

Alternatively, does your DB log show any problems?

FWIW,
-- 
Hassan Schroeder ------------------------ [email protected]

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to