Sha256: fa4f092ab0cec5a806c3a8e9fb062137a7fcbca86f3ea67437077baf7803b10a

Contents?: true

Size: 1001 Bytes

Versions: 24

Compression:

Stored size: 1001 Bytes

Contents

# frozen_string_literal: true

# generado con pg_rails

module Admin
  class UsersController < AdminController
    include PgEngine::Resource

    self.clase_modelo = User

    before_action(only: :index) { authorize User }

    before_action only: %i[update] do
      params[:user].delete(:password) if params[:user][:password].blank?
    end

    before_action :set_instancia_modelo, only: %i[new create show edit update destroy]

    def create
      @user.skip_confirmation!
      @user.orphan = true

      pg_respond_create
    end

    def update
      @user.skip_reconfirmation!
      pg_respond_update
    end

    private

    def atributos_permitidos
      %i[email nombre apellido password developer]
    end

    def atributos_para_buscar
      %i[email nombre apellido developer]
    end

    def atributos_para_listar
      %i[email nombre apellido confirmed_at developer]
    end

    def atributos_para_mostrar
      %i[email nombre apellido confirmed_at developer]
    end
  end
end

Version data entries

24 entries across 24 versions & 1 rubygems

Version Path
pg_rails-7.6.17 pg_engine/app/controllers/admin/users_controller.rb
pg_rails-7.6.16 pg_engine/app/controllers/admin/users_controller.rb
pg_rails-7.6.15 pg_engine/app/controllers/admin/users_controller.rb
pg_rails-7.6.14 pg_engine/app/controllers/admin/users_controller.rb
pg_rails-7.6.13 pg_engine/app/controllers/admin/users_controller.rb
pg_rails-7.6.12 pg_engine/app/controllers/admin/users_controller.rb
pg_rails-7.6.11 pg_engine/app/controllers/admin/users_controller.rb
pg_rails-7.6.10 pg_engine/app/controllers/admin/users_controller.rb
pg_rails-7.6.9 pg_engine/app/controllers/admin/users_controller.rb
pg_rails-7.6.8 pg_engine/app/controllers/admin/users_controller.rb
pg_rails-7.6.7 pg_engine/app/controllers/admin/users_controller.rb
pg_rails-7.6.6 pg_engine/app/controllers/admin/users_controller.rb
pg_rails-7.6.5 pg_engine/app/controllers/admin/users_controller.rb
pg_rails-7.6.4 pg_engine/app/controllers/admin/users_controller.rb
pg_rails-7.6.3 pg_engine/app/controllers/admin/users_controller.rb
pg_rails-7.6.2 pg_engine/app/controllers/admin/users_controller.rb
pg_rails-7.6.1 pg_engine/app/controllers/admin/users_controller.rb
pg_rails-7.6.0 pg_engine/app/controllers/admin/users_controller.rb
pg_rails-7.5.7 pg_engine/app/controllers/admin/users_controller.rb
pg_rails-7.5.6 pg_engine/app/controllers/admin/users_controller.rb