I agree with you. Will change this PR later today. I'm having breakfast in
the hotel at the moment ;)

ÓÒÅÄÁ, 2 ÑÎ×ÁÒÑ 2013 Ç. ÐÏÌØÚÏ×ÁÔÅÌØ Ryan Bigg ÐÉÓÁÌ:

> In db/default/users.rb:
>
> >    if Spree::User.find_by_email(email)
> >      say "\nWARNING: There is already a user with the email: #{email}, so no account changes were made.  If you wish to create an additional admin user, please run rake spree_auth:admin:create again with a different email.\n\n"
> >    else
> > -    admin = Spree::User.create(attributes)
> > -    # create an admin role and and assign the admin user to that role
> > -    role = Spree::Role.find_or_create_by_name 'admin'
> > -    admin.spree_roles << role
> > -    admin.save
> > +    admin = Spree::User.new(attributes)
> > +    if admin.save
> > +      role = Spree::Role.find_or_create_by_name 'admin'
> > +      admin.spree_roles << role
> > +      admin.save
> > +      say "Done!"
> > +    else
> > +      say "There was some problems with persisting new admin user. Run with INSPECT_ERRORS=true for details"
> > +      if ENV['INSPECT_ERRORS']
>
> I think we should just show the errors anyway, and in a more presentable
> format. How about admin.errors.full_messages?
>
> --
> Reply to this email directly or view it on GitHub<https://github.com/spree/spree_auth_devise/pull/42/files#r2526231>.
>
>


-- 
ó Õ×ÁÖÅÎÉÅÍ,
îÉËÏÌÁÊ ûÅÂÁÎÏ×