Re: [Rails-core] .html_safe is ambiguous and should be renamed

2015-02-05 Thread Rainer Frey
Renaming it to: .prevent_html_escaping would make it unambiguous, and >> directly refer to what is actually being done (so that the programmer >> doesn't have to infer what "safe" means, precisely). >> > > Agreed. > Well, on second thought, I'm not so sure if I find the effort warranted. But if th

Re: [Rails-core] .html_safe is ambiguous and should be renamed

2015-02-05 Thread Will Bryant
Bikeshedding! Count me in. How 'bout #is_safe_html. > On 5/02/2015, at 18:59 , Rainer Frey wrote: > > > > Renaming it to: .prevent_html_escaping would make it unambiguous, and > directly refer to what is actually being done (so that the programmer doesn't > have to infer what "safe" means

[Rails-core] Re: To Patch or Not To Patch

2015-02-05 Thread Magne
I'd find it extremely useful. The current implementation sucks, for various reasons. Actually, what you expect when you use *distance_of_time_in_words*, and what arguably should be the default in rails, is for it to *output precisely what you input*. The method is not called *rounded_distance_o

[Rails-core] Support Different Column Names in has_secure_password

2015-02-05 Thread todd
I'd like to gauge interest in adding support for different column names for ActiveModel::SecurePassword. Currently, has_secure_password assumes that the column name for the attribute you want to encrypt is simply "password." Obviously, this may not always be the column name of the data you're tr

Re: [Rails-core] .html_safe is ambiguous and should be renamed

2015-02-05 Thread George Millo
In years of using Rails it has never occurred to me that the name "html_safe" can be ambiguous until just now when I read this thread. When is a developer going to stumble across this method without knowing what it means and insert it blindly into their code? If it really *is *ambiguous, peopl

Re: [Rails-core] To Patch or Not To Patch

2015-02-05 Thread Matt Jones
On Feb 5, 2015, at 8:35 AM, Magne wrote: > I'd find it extremely useful. The current implementation sucks, for various > reasons. > > Actually, what you expect when you use distance_of_time_in_words, and what > arguably should be the default in rails, is for it to output precisely what > you

Re: [Rails-core] Support Different Column Names in has_secure_password

2015-02-05 Thread Godfrey Chan
On Thursday, Feb 5, 2015 at 3:40 PM, t...@t0dd.io , wrote: I'd like to gauge interest in adding support for different column names for ActiveModel::SecurePassword. Currently, has_secure_password assumes that the column name for the attribute you want to encrypt is simply "password." Obviously,