Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Uncaught TypeError: Cannot read property '$login_field' of undefined #1

Open
xurde opened this issue Jan 14, 2015 · 2 comments
Open

Comments

@xurde
Copy link

xurde commented Jan 14, 2015

Just followed the steps in Readme and when I try to submit #, I get this error which interrupts runtime.
Any clue on how can I proceed?

Thanks in advance.

@xurde
Copy link
Author

xurde commented Jan 14, 2015

It's obviously related to this line of code:

login = model.send(:"_#{User.login_field}")

I can't see where this login_field method is declared or configured anywhere else.

@xurde
Copy link
Author

xurde commented Jan 14, 2015

I managed to solve this issue adding a class method to User model.

  def self.login_field
    'email'
  end

But I think this should be handled in the # controller using the existing method use_username?

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant