Sha256: 5f974ae617dfb5a47ca43e64f39373e864df261ce62adb2d78f300baccf2ffc9

Contents?: true

Size: 572 Bytes

Versions: 12

Compression:

Stored size: 572 Bytes

Contents

module PgEngine
  class DeviseController < ApplicationController
    before_action :configure_permitted_parameters

    layout :layout_by_resource

    def layout_by_resource
      if controller_name == 'registrations' && action_name.in?(%w[edit update])
        'pg_layout/layout'
      else
        'pg_layout/devise'
      end
    end

    protected

    def configure_permitted_parameters
      devise_parameter_sanitizer.permit(:sign_up, keys: %i[nombre apellido])
      devise_parameter_sanitizer.permit(:account_update, keys: %i[nombre apellido])
    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
pg_rails-7.0.8.pre.alpha.21 pg_engine/app/controllers/pg_engine/devise_controller.rb
pg_rails-7.0.8.pre.alpha.20 pg_engine/app/controllers/pg_engine/devise_controller.rb
pg_rails-7.0.8.pre.alpha.19 pg_engine/app/controllers/pg_engine/devise_controller.rb
pg_rails-7.0.8.pre.alpha.18 pg_engine/app/controllers/pg_engine/devise_controller.rb
pg_rails-7.0.8.pre.alpha.17 pg_engine/app/controllers/pg_engine/devise_controller.rb
pg_rails-7.0.8.pre.alpha.16 pg_engine/app/controllers/pg_engine/devise_controller.rb
pg_rails-7.0.8.pre.alpha.15 pg_engine/app/controllers/pg_engine/devise_controller.rb
pg_rails-7.0.8.pre.alpha.14 pg_engine/app/controllers/pg_engine/devise_controller.rb
pg_rails-7.0.8.pre.alpha.13 pg_engine/app/controllers/pg_engine/devise_controller.rb
pg_rails-7.0.8.pre.alpha.12 pg_engine/app/controllers/pg_engine/devise_controller.rb
pg_rails-7.0.8.pre.alpha.11 pg_engine/app/controllers/pg_engine/devise_controller.rb
pg_rails-7.0.8.pre.alpha.10 pg_engine/app/controllers/pg_engine/devise_controller.rb