The function is delete_row and is in application.rb (Global controller)
#---- written by Carlos Augusto Monterrosa Lopez
def delete_row(row)
begin
row.destroy
flash[:notice]="Row deleted"
redirect_to :action => 'list', :controller => "#{params[:controller]}"
rescue
flash[:notice]="Here you personal error message"
redirect_to :action => 'list', :controller => "#{params[:controller]}"
end
end
No hay comentarios:
Publicar un comentario