jdtornow / challah

User authorization and session management in Rails.
MIT License
18 stars 7 forks source link

username removed causing `rake challah:setup` to fail #24

Closed atomkirk closed 8 years ago

atomkirk commented 8 years ago

rake challah:setup asks for info about a new user, one of them is username, which breaks because there is no username field in the user migration.

philtr commented 8 years ago

I don't think Users has ever had username.

Here is the username= method: https://github.com/jdtornow/challah/blob/master/lib/challah/concerns/user/passwordable.rb#L43-L46

Then it writes that value to the Authorization record here: https://github.com/jdtornow/challah/blob/15dfefe2031ea0dd9f38afaeffe8b875f5e5479a/lib/challah/providers/password_provider.rb#L4

What's the error you're getting?

atomkirk commented 8 years ago
Populating seed data...
==========================================================================
  Creating a user
==========================================================================

Please answer the following questions to create your first admin user.

First name: Adam
Last name: Kirk
Email: adam.kirk@ovenbits.com
Username: |adam.kirk@ovenbits.com| atomkirk
Password:
Password again:
rake aborted!
NoMethodError: undefined method `username=' for #<User:0x007ffb2bc896b8>
atomkirk commented 8 years ago

Oh, you know what? I created the User model before I started installing Challah, and it had a username. My bad.

jdtornow commented 8 years ago

Thanks @philtr :)