actualizar los consensos
This commit is contained in:
parent
48319358a6
commit
7f987654c5
3 changed files with 4 additions and 1 deletions
|
@ -14,7 +14,7 @@ class ConsensosController < ApplicationController
|
|||
#
|
||||
# @return [Array] [ consensos ]
|
||||
def index
|
||||
@consensos = @barca.consensos.order(:created_at, :desc)
|
||||
@consensos = @barca.consensos.order(:updated_at, :desc)
|
||||
end
|
||||
|
||||
# GET /barcas/:barca_id/consensos/:id
|
||||
|
|
|
@ -26,6 +26,8 @@ class PosicionesController < ApplicationController
|
|||
@posicion.try(:pirata=, current_pirata)
|
||||
|
||||
if @posicion.try(:save)
|
||||
@consenso.touch
|
||||
|
||||
notify subject: :create
|
||||
render status: :created
|
||||
else
|
||||
|
|
|
@ -25,6 +25,7 @@ class PosicionesControllerTest < ActionDispatch::IntegrationTest
|
|||
|
||||
assert_equal estado, posicion.estado
|
||||
assert_equal consenso, posicion.consenso
|
||||
assert_not_equal consenso.updated_at, posicion.consenso.updated_at
|
||||
assert_equal 'porque me place', posicion.comentario
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue