Inconsistency in use of user_name and username

20 views
Skip to first unread message

Koen Punt

unread,
Jun 22, 2016, 2:17:15 PM6/22/16
to Ruby on Rails: Core
At first it appeared to me in the smtp settings, the username has to be specified as "user_name", but the comment in the source is naming it "username".

* <tt>:user_name</tt> - If your mail server requires authentication, set the username in this setting.

https://github.com/rails/rails/blob/master/actionmailer/lib/action_mailer/base.rb#L382

And doing a search on "user_name" and "username" in the repository both give quite some results.

I think making this consistent could make things more clear, and makes typing configuration possible, instead of copy-pasting.

richard schneeman

unread,
Jun 22, 2016, 3:03:09 PM6/22/16
to Koen Punt, rubyonra...@googlegroups.com
Would need to change everywhere that it's being called, add a deprecation and work with both values for now.

Looks like `:username` is found more often in the codebase 334 times compared to `user_name` coming in at 231.

-- 
Richard Schneeman

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-co...@googlegroups.com.
To post to this group, send email to rubyonra...@googlegroups.com.
Visit this group at https://groups.google.com/group/rubyonrails-core.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages