-
Notifications
You must be signed in to change notification settings - Fork 212
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
#578 More extensive database seeding - bulk creating members, gardens and plantings #731
Conversation
:login_name => "test#{i}", | ||
:email => "test#{i}@example.com", | ||
:password => "password#{i}", | ||
:tos_agreement => true | ||
) | ||
@user.confirm! | ||
@user.skip_confirmation! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's the rationale for this change?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for looking at my code. Currently when a test user is loaded, content of the confirmation email for each user opens up in a browser. However, skip_confirmation
automatically confirm the user and avoid generating thousands of confirmation emails/pages. My rationale is most of the time we ignore the confirmation pages, and if someone wants to test the confirmation email content specifically, it can be tested manually.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I find those browser windows annoying; therefore, I love you right now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your endorsement :-) yes, it was annoying me too.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is great, thanks! I suspect .skip_confirmation is new since we
started using Devise but it is a very nice thing to be able to use, and
avoid those popup windows.
On 26/03/2015 8:08 am, Shiho Takagi wrote:
In db/seeds.rb
#731 (comment)::login_name => "test#{i}", :email => "test#{i}@example.com", :password => "password#{i}", :tos_agreement => true )
- @user.confirm!
- @user.skip_confirmation!
Thanks for looking at my code. Currently when a test user is loaded,
content of the confirmation email for each user opens up in a browser.
However, |skip_confirmation| automatically confirm the user and avoid
generating thousands of confirmation emails/pages. My rationale is
most of the time we ignore the confirmation pages, and if someone
wants to test the confirmation email content specifically, it can be
tested manually.—
Reply to this email directly or view it on GitHub
https://github.com/Growstuff/growstuff/pull/731/files#r27166170.
Alex "Skud" Bayley
skud@growstuff.org
http://growstuff.org/
…-database-seeding-improvement
1 similar comment
7e7b273
to
d95bd0e
Compare
Added sunniness and planted_from field data population on plantings. |
Added sunniness and planted_from field on planting. |
This will help move work forward on the pull request for sunniness and planting charts. Hope we can merge this one in soon. |
As soon as release 8 is pushed live, I have about 10 things to merge right
away.
|
That's cool. I can see that there is a large queue. Working on pulling in the branch and just using that for now. |
This looks great and I'm going to merge it :) I would support the idea of automatically creating 20 or so test users, as a default case, fwiw. |
#578 More extensive database seeding - bulk creating members, gardens and plantings
Welcome back, @Skud! Yup, increasing the number of default users sounds good. I think I'll implement it in the next iteration along with other improvements in database seeding. |
Made some improvement on the database seeding process, covering some items from issue #578. Just did this as I wanted to test performance on geo related processing.
This will let you...
The default number of members is still 3, but you can specify the number of members as...
rake db:seed member_size=100
or
rake db:reset member_size=100
Tested up to 1000 worked fine.