Please do abandon Rails: less competition.
Your code looks good but one thing is strange: why do you redirect to the list action if update_attributes fails?
You need to give more code/information before we can find the error.
Also, why do you use spanish identifiers? If you'd used updated_at instead of fecha_modificacion you could have dropped this line:
Code:
@persona.fecha_modificacion = Time.now
I don't understand why you have this code:
Code:
if @persona.fecha_creacion? == nil
@persona.fecha_creacion = @persona.fecha_modificacion
@persona.creacion_user_id = @persona.modificacion_user_id
@persona.eliminado = 0
end
I think it belongs in a separate create action?
Bookmarks