Sha256: 964ddbb97568fa142227fcb9f40c08706dab5a2c5405e3efce7df1126021e544

Contents?: true

Size: 968 Bytes

Versions: 7

Compression:

Stored size: 968 Bytes

Contents

module PhcdevworksAccounts
    class ApplicationController < ActionController::Base

        # Devise Filter
        before_action :phcdevworks_accounts_permitted_parameters, if: :devise_controller?

        # Security Filters
        protect_from_forgery with: :exception

        # Load Requried Helper Files
        helper PhcdevworksActiveMenus::Engine.helpers
        helper PhcdevworksNotifications::Engine.helpers
        helper PhcdevworksTitleseo::Engine.helpers

        private

        # Whitelist Additional Fields
        def phcdevworks_accounts_permitted_parameters
            added_attrs = [:username, :firstname, :lastname, :email, :terms_of_service, :payments_customer_id, :payments_subscription_id, :payments_plan_id, :password, :password_confirmation, :remember_me]
            devise_parameter_sanitizer.permit :sign_up, keys: added_attrs
            devise_parameter_sanitizer.permit :account_update, keys: added_attrs
        end

    end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
phcdevworks_accounts-3.2.4 app/controllers/phcdevworks_accounts/application_controller.rb
phcdevworks_accounts-3.2.3 app/controllers/phcdevworks_accounts/application_controller.rb
phcdevworks_accounts-3.2.2 app/controllers/phcdevworks_accounts/application_controller.rb
phcdevworks_accounts-3.2.1 app/controllers/phcdevworks_accounts/application_controller.rb
phcdevworks_accounts-3.2.0 app/controllers/phcdevworks_accounts/application_controller.rb
phcdevworks_accounts-3.1.2 app/controllers/phcdevworks_accounts/application_controller.rb
phcdevworks_accounts-3.1.1 app/controllers/phcdevworks_accounts/application_controller.rb