undefined local variable or method `resource_class' in devise
问题 I am trying add a attribute called username to devise but rails shows me an error in the following line of code I am using rails 4.0.0 and devise 3 def configure_permitted_parameters devise_parameter_sanitizer.for(:sign_up) { |u| u.permit(:username, :email, :password, :password_confirmation) } end Controller application class ApplicationController < ActionController::Base # Prevent CSRF attacks by raising an exception. # For APIs, you may want to use :null_session instead. protect_from