Q:

Rails upgrade: wrong number of arguments (2 for 1) for assign_attributes

Hi I have uprgaded from rails 3.2.12 to 4.0.0 most thinks working fine now, but I got this error:

Whats the Problem in this case? 

A:

The message signature changed from two arguments to one.  Compare v3.2.12 and v4.0.2:
assign_attributes(new_attributes, options = {}) # 3.2.12

assign_attributes(new_attributes)               # 4.0.2

Rails 3 mass assignment protection is deprecated, and this is part of it.  Protecting attributes from mass assignment was extracted into a gem.  From its README:

You can also bypass mass-assignment security by using the :without_protection option. 

In versions 4.x, you don't need the :without_protection option anymore because you're encouraged to use Strong Parameters. 
For a smooth upgrade, you can probably just bundle the protected_attributes gem.  But note that "this plugin will be officially supported until the release of Rails 5.0." 
Also, you don't need to use @user.send(:update_attributes, …), you can just use @user.update_attributes(…).