Class: Sivel2Gen::Admin::MaternidadesController

Inherits:
Msip::Admin::BasicasController
  • Object
show all
Defined in:
app/controllers/sivel2_gen/admin/maternidades_controller.rb

Instance Method Summary collapse

Instance Method Details

#claseObject



7
8
9
# File 'app/controllers/sivel2_gen/admin/maternidades_controller.rb', line 7

def clase 
  "Sivel2Gen::Maternidad"
end

#genclaseObject



16
17
18
# File 'app/controllers/sivel2_gen/admin/maternidades_controller.rb', line 16

def genclase
  return 'F';
end

#maternidad_paramsObject

Never trust parameters from the scary internet, only allow the white list through.



21
22
23
# File 'app/controllers/sivel2_gen/admin/maternidades_controller.rb', line 21

def maternidad_params
  params.require(:maternidad).permit(*atributos_form)
end

#set_maternidadObject

Use callbacks to share common setup or constraints between actions.



12
13
14
# File 'app/controllers/sivel2_gen/admin/maternidades_controller.rb', line 12

def set_maternidad
  @basica = Sivel2Gen::Maternidad.find(params[:id])
end