Sha256: c2f4c7832e168701b6949785d063f2da681ea2f1083131a7d9a6b17fa0e80f81

Contents?: true

Size: 944 Bytes

Versions: 25

Compression:

Stored size: 944 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, :password, :password_confirmation, :remember_me]
      devise_parameter_sanitizer.permit :sign_up, keys: added_attrs
      devise_parameter_sanitizer.permit :account_update, keys: added_attrs
    end

    # Redirect User to Root After Login
    def after_sign_in_path_for(resource)
      main_app.root_path
    end

  end
end

Version data entries

25 entries across 25 versions & 1 rubygems

Version Path
phcdevworks_accounts-1.5.1 app/controllers/phcdevworks_accounts/application_controller.rb
phcdevworks_accounts-1.5.0 app/controllers/phcdevworks_accounts/application_controller.rb
phcdevworks_accounts-1.4.2 app/controllers/phcdevworks_accounts/application_controller.rb
phcdevworks_accounts-1.4.1 app/controllers/phcdevworks_accounts/application_controller.rb
phcdevworks_accounts-1.4.0 app/controllers/phcdevworks_accounts/application_controller.rb
phcdevworks_accounts-1.3.4 app/controllers/phcdevworks_accounts/application_controller.rb
phcdevworks_accounts-1.3.3 app/controllers/phcdevworks_accounts/application_controller.rb
phcdevworks_accounts-1.3.2 app/controllers/phcdevworks_accounts/application_controller.rb
phcdevworks_accounts-1.3.1 app/controllers/phcdevworks_accounts/application_controller.rb
phcdevworks_accounts-1.3.0 app/controllers/phcdevworks_accounts/application_controller.rb
phcdevworks_accounts-1.2.0 app/controllers/phcdevworks_accounts/application_controller.rb
phcdevworks_accounts-1.1.2 app/controllers/phcdevworks_accounts/application_controller.rb
phcdevworks_accounts-1.1.1 app/controllers/phcdevworks_accounts/application_controller.rb
phcdevworks_accounts-1.1.0 app/controllers/phcdevworks_accounts/application_controller.rb
phcdevworks_accounts-1.0.1 app/controllers/phcdevworks_accounts/application_controller.rb
phcdevworks_accounts-1.0.0 app/controllers/phcdevworks_accounts/application_controller.rb
phcdevworks_accounts-0.9.0 app/controllers/phcdevworks_accounts/application_controller.rb
phcdevworks_accounts-0.8.0 app/controllers/phcdevworks_accounts/application_controller.rb
phcdevworks_accounts-0.7.0 app/controllers/phcdevworks_accounts/application_controller.rb
phcdevworks_accounts-0.6.0 app/controllers/phcdevworks_accounts/application_controller.rb