If you're using Rails4
(I think so), make sure you have this new attribute into user_params
in your controller (because of strong_parameters
):
def user_params
params.require(:user).permit(:name, :surname)
end
It's a typical mistake when new to this Rails
version.
Further information here: strong_parameters