lundi 19 février 2018

Rails can't convert Hash into Integer

After setup the current_user

def current_user
    @current_user ||= User.first(conditions: ['auth_token = :token or oauth_token = :token', { token: cookies[:auth_token] }]) if cookies[:auth_token]
  end

rails raised

can't convert Hash into Integer

This method was working in rails 3 now on rails 5 raised this, someone can spare a hint about this issue?

Aucun commentaire:

Enregistrer un commentaire