I'm going nuts with an error I'm getting every time I try to sing in/sing up on my web.
Heroku logs:
Started GET "/users/sign_in" for 201.235.89.150 at 2016-07-06 01:35:03 +0000
Completed 500 Internal Server Error in 3ms (ActiveRecord: 0.0ms)
NoMethodError (undefined method `for' for #<Devise::ParameterSanitizer:0x007f5968e0a920>):
app/controllers/application_controller.rb:11:in `configure_permitted_parameters'
application_controller.rb
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_filter :configure_permitted_parameters, if: :devise_controller?
protected
def configure_permitted_parameters
devise_parameter_sanitizer.for(:sign_up) { |u| u.permit(:username, :email, :password, :provider, :uid) }
devise_parameter_sanitizer.for(:account_update) { |u| u.permit(:username, :email, :password, :current_password) }
end
end
The thing is it is working fine locally. It´s just on Heroku. And also it was working just fine a couple of days ago.