[Ror-es] find si error

William Betancur ruby-forum-incoming at andreas-s.net
Mon Jul 9 13:05:47 GMT 2007


     def update
        @movimiento = Movimiento.find(:first, :conditions => [ "placa = 
? and tipo = ?", plc, 1])
  begin
    if @movimiento.tipo = 1
       # instrucciones
             else
                # otras        # instrucciones
             end
    end
  rescue

          redirect_to :action => "msj_error", :mensaje => @msj
  end
      end

Emilio, por si te sirve, así lo hice yo y me funciona.

saludos

-- 
Posted via http://www.ruby-forum.com/.


More information about the Ror-es mailing list