A website template with lots of features, built with ruby on rails.

application_controller.rb 556B

1234567891011121314
  1. class ApplicationController < ActionController::Base
  2. # Prevent CSRF attacks by raising an exception.
  3. # For APIs, you may want to use :null_session instead.
  4. protect_from_forgery with: :exception
  5. before_filter :configure_permitted_parameters, if: :devise_controller?
  6. def configure_permitted_parameters
  7. devise_parameter_sanitizer.for(:account_update) { |u| u.permit(:first_name, :last_name, :email, :current_password) }
  8. devise_parameter_sanitizer.for(:sign_up) { |u| u.permit(:first_name, :last_name, :email, :password) }
  9. end
  10. end