Sha256: 24132599d037decdd30d07f45fd9b48edcba36e13c846284176ca687cbd01f2f

Contents?: true

Size: 670 Bytes

Versions: 2

Compression:

Stored size: 670 Bytes

Contents

module Locomotive
  class RegistrationsController < ::Devise::RegistrationsController

    include Locomotive::Concerns::SslController
    include Locomotive::Concerns::RedirectToMainHostController

    layout 'locomotive/layouts/account'

    before_action :configure_permitted_parameters

    helper Locomotive::BaseHelper

    respond_to :html, :json

    before_action :set_locale

    private

    def after_sign_up_path_for(resource)
      sites_path
    end

    def configure_permitted_parameters
      devise_parameter_sanitizer.permit(:sign_up, keys: [:name])
    end

    def set_locale
      I18n.locale = Locomotive.config.default_locale
    end

  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
locomotivecms-4.2.0.alpha2 app/controllers/locomotive/registrations_controller.rb
locomotivecms-4.2.0.alpha1 app/controllers/locomotive/registrations_controller.rb