pools_controller.rb
440 Bytes
class Admin::PoolsController < CrudController::Base
# enable_gatekeeper
# guard_bifrost
def update
if update!
redirect_to admin_pools_path
else
render :edit
end
end
private
def object_params
params.require(:pool).permit(
:name, :editable_until, :active,
matches_attributes: [:id, :_destroy, :local, :visit, :score_local,
:score_visit, :date]
)
end
end