class ApplicationController < ActionController::Base
	# Prevent CSRF attacks by raising an exception.
	# For APIs, you may want to use :null_session instead.
	protect_from_forgery with: :exception
	before_action :set_locale
  before_action :configure_permitted_parameters, if: :devise_controller?

	def default_url_options(options={})
		{ :locale => I18n.locale == I18n.default_locale ? nil : I18n.locale  }
  end

  def configure_permitted_parameters
    devise_parameter_sanitizer.for(:sign_up) << [:nom, :prenom]
  end
	
private
	def set_locale
		I18n.locale = params[:locale] || I18n.default_locale
  end

end

class ApplicationController < ActionController::Base
	# Prevent CSRF attacks by raising an exception.
	# For APIs, you may want to use :null_session instead.
	protect_from_forgery with: :exception
	before_action :set_locale
  before_action :configure_permitted_parameters, if: :devise_controller?

	def default_url_options(options={})
		{ :locale => I18n.locale == I18n.default_locale ? nil : I18n.locale  }
  end

  def configure_permitted_parameters
    devise_parameter_sanitizer.for(:sign_up) << [:nom, :prenom, :telephone]
  end
	
private
	def set_locale
		I18n.locale = params[:locale] || I18n.default_locale
  end

end

FIX : ajout du champ telephone dans les strong parameters du model User
FIX : ajout du champ telephone dans les strong parameters du model User
