Sha256: 055f8149a08e089e616e8ccfb027eff87df93e43af79e530c312a99f1225b130

Contents?: true

Size: 782 Bytes

Versions: 33

Compression:

Stored size: 782 Bytes

Contents

module PgEngine
  class DeviseController < ApplicationController
    prepend_before_action only: :create do
      rate_limiting(
        to: 10,
        within: 1.hour,
        by: -> { request.remote_ip },
        with: -> { head :too_many_requests },
        store: cache_store
      )
    end

    before_action :configure_permitted_parameters
    before_action do
      @no_main_frame = true
    end

    layout :layout_by_user

    protected

    def layout_by_user
      user_signed_in? ? 'pg_layout/containerized' : 'pg_layout/devise'
    end

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

Version data entries

33 entries across 33 versions & 1 rubygems

Version Path
pg_rails-7.6.20 pg_engine/app/controllers/pg_engine/devise_controller.rb
pg_rails-7.6.19 pg_engine/app/controllers/pg_engine/devise_controller.rb
pg_rails-7.6.18 pg_engine/app/controllers/pg_engine/devise_controller.rb
pg_rails-7.6.17 pg_engine/app/controllers/pg_engine/devise_controller.rb
pg_rails-7.6.16 pg_engine/app/controllers/pg_engine/devise_controller.rb
pg_rails-7.6.15 pg_engine/app/controllers/pg_engine/devise_controller.rb
pg_rails-7.6.14 pg_engine/app/controllers/pg_engine/devise_controller.rb
pg_rails-7.6.13 pg_engine/app/controllers/pg_engine/devise_controller.rb
pg_rails-7.6.12 pg_engine/app/controllers/pg_engine/devise_controller.rb
pg_rails-7.6.11 pg_engine/app/controllers/pg_engine/devise_controller.rb
pg_rails-7.6.10 pg_engine/app/controllers/pg_engine/devise_controller.rb
pg_rails-7.6.9 pg_engine/app/controllers/pg_engine/devise_controller.rb
pg_rails-7.6.8 pg_engine/app/controllers/pg_engine/devise_controller.rb
pg_rails-7.6.7 pg_engine/app/controllers/pg_engine/devise_controller.rb
pg_rails-7.6.6 pg_engine/app/controllers/pg_engine/devise_controller.rb
pg_rails-7.6.5 pg_engine/app/controllers/pg_engine/devise_controller.rb
pg_rails-7.6.4 pg_engine/app/controllers/pg_engine/devise_controller.rb
pg_rails-7.6.3 pg_engine/app/controllers/pg_engine/devise_controller.rb
pg_rails-7.6.2 pg_engine/app/controllers/pg_engine/devise_controller.rb
pg_rails-7.6.1 pg_engine/app/controllers/pg_engine/devise_controller.rb