Sha256: e41300dda868990a7b5a8296f85771a06888bf6acc47669954b21be927daca63

Contents?: true

Size: 685 Bytes

Versions: 4

Compression:

Stored size: 685 Bytes

Contents

module Admin
  class <%= nom_clase_plural %>Controller < Msip::Admin::BasicasController
    before_action :set_<%= nom_arch %>, 
      only: [:show, :edit, :update, :destroy]
    load_and_authorize_resource  class: ::<%= nom_clase %>

    def clase 
      "::<%= nom_clase %>"
    end

    def set_<%= nom_arch %>
      @basica = <%= nom_clase %>.find(params[:id])
    end

    def atributos_index
      [
        :id, 
        :nombre, 
        :observaciones, 
        :fechacreacion_localizada, 
        :habilitado
      ]
    end

    def genclase
      'M'
    end

    def <%= nom_arch %>_params
      params.require(:<%= nom_arch %>).permit(*atributos_form)
    end

  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
msip-2.2.0.beta1 lib/generators/msip/templates/tablasbasicas_controller.rb.erb
msip-2.2.0.alfa3 lib/generators/msip/templates/tablasbasicas_controller.rb.erb
msip-2.2.0.alfa2 lib/generators/msip/templates/tablasbasicas_controller.rb.erb
msip-2.2a2 lib/generators/msip/templates/tablasbasicas_controller.rb.erb