#337 ✓resolved
Tiago Franco

User generator is incoherent on username

Reported by Tiago Franco | December 1st, 2008 @ 08:36 PM

The user generator is incoherent, as it creates a column named 'name' when the states require a 'username'.

The file hobo/rails_generators/hobo_user_model/tempaltes/model.rb contains the following:

Lines 5 to 10:

fields do

name :string, :unique
email_address :email_address, :unique, :login => true
administrator :boolean, :default => false
timestamps

end

Lines 23 to 26:

create :signup, :available_to => "Guest", :params => [:username, :email_address, :password, :password_confirmation], :become => :active

This will create a problem to new applications, as the signup form will require a 'username' and the table column is called 'name'.

Comments and changes to this ticket

  • Tiago Franco

    Tiago Franco December 1st, 2008 @ 10:23 PM

    proposed fix:

    replace :username by :name on the :create transition of the lifecycle (line 24 of model.rb for hobo_user_model generator).

  • Tom Locke

    Tom Locke December 2nd, 2008 @ 10:15 AM

    • State changed from “new” to “resolved”

    Thanks Tiago - this was a slip-up. Should be OK now. Or at least as soon as I merge the new_permissions branch - I think I made the fix in there.

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

People watching this ticket

Pages