Controller de entregas

This commit is contained in:
2024-09-11 23:14:26 -03:00
parent 7de1b5279a
commit fde98d5098
3 changed files with 10 additions and 0 deletions

View File

@ -0,0 +1,6 @@
class EntregasController < ApplicationController
def add
@entrega = Entrega.find_by(viaje: params[:viaje], nombre_recibe: params[:recibe])
@entrega.update
end
end

View File

@ -1,4 +1,5 @@
Rails.application.routes.draw do
post "/entregas", to: "entregas#add"
get "/ruta", to: 'ruta#get'
post "/ruta", to: 'ruta#add'
# Define your application routes per the DSL in https://guides.rubyonrails.org/routing.html

View File

@ -17,5 +17,8 @@ module ActiveSupport
def ruta_add_url
"/ruta"
end
def entregas_add_url
"/entrega"
end
end
end