Controller de entregas
This commit is contained in:
6
app/controllers/entregas_controller.rb
Normal file
6
app/controllers/entregas_controller.rb
Normal 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
|
@ -1,4 +1,5 @@
|
|||||||
Rails.application.routes.draw do
|
Rails.application.routes.draw do
|
||||||
|
post "/entregas", to: "entregas#add"
|
||||||
get "/ruta", to: 'ruta#get'
|
get "/ruta", to: 'ruta#get'
|
||||||
post "/ruta", to: 'ruta#add'
|
post "/ruta", to: 'ruta#add'
|
||||||
# Define your application routes per the DSL in https://guides.rubyonrails.org/routing.html
|
# Define your application routes per the DSL in https://guides.rubyonrails.org/routing.html
|
||||||
|
@ -17,5 +17,8 @@ module ActiveSupport
|
|||||||
def ruta_add_url
|
def ruta_add_url
|
||||||
"/ruta"
|
"/ruta"
|
||||||
end
|
end
|
||||||
|
def entregas_add_url
|
||||||
|
"/entrega"
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
Reference in New Issue
Block a user