Sha256: dd48f7861b9cacf05da4cd2334bf6c008922a77c4687c41515bece0d53dff6a9

Contents?: true

Size: 799 Bytes

Versions: 2

Compression:

Stored size: 799 Bytes

Contents

module Optimacms
  #class ApplicationController < ActionController::Base
  class ApplicationController < ::ApplicationController
    protect_from_forgery with: :exception

    # include FontAwesome::Rails::IconHelper

    include Optimacms::ApplicationHelper


    def current_lang
      return I18n.locale
    end

    def not_found
      raise ActionController::RoutingError.new('Not Found')
    end


    # devise
    before_action :configure_permitted_parameters, if: :devise_controller?


    protected

    def configure_permitted_parameters
      added_attrs = [:username, :email, :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

2 entries across 2 versions & 1 rubygems

Version Path
optimacms-0.4.3 app/controllers/optimacms/application_controller.rb
optimacms-0.4.2 app/controllers/optimacms/application_controller.rb