Skip to content
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

Rename Internet#user_name to #username #1306

Merged
merged 1 commit into from
Jul 9, 2018
Merged

Conversation

tylerhunt
Copy link
Contributor

Call me pedantic, but this—by far—has always been my biggest gripe with Faker. "Username" is the more typical and standardized spelling. I always seem to end up with code like this:

User.new(
  username: Faker::Internet.user_name,
  password: Faker::Internet.password,
)

Having to remember that difference for this one library (and put up with the misalignment to boot 😉) is a constant source of frustration. Here's what that code would look like now:

User.new(
  username: Faker::Internet.username,
  password: Faker::Internet.password,
)

Ah, much improved!

I've added an alias to maintain backwards compatibility.

"Username" is the more typical and standardized spelling.

Add an alias to maintain backwards compatibility.
@stympy stympy merged commit 00be118 into faker-ruby:master Jul 9, 2018
@stympy
Copy link
Contributor

stympy commented Jul 9, 2018

Thanks 😉

@vbrazo vbrazo added the Chores label Jul 11, 2018
davidmorton0 pushed a commit to davidmorton0/faker that referenced this pull request Jul 12, 2021
"Username" is the more typical and standardized spelling.

Add an alias to maintain backwards compatibility.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants