That method seems to be private API of Rails (at least it should be) so go ahead to remove/deprecate it.
On Fri, Jan 22, 2016 at 1:10 PM Kache <[email protected]> wrote: > Was about to open GitHub issue, but found this mailing list. > > [ActiveRecord::Result#to_hash]( > https://github.com/rails/rails/commit/59f7780a3454a14054d1d33d9b6e31192ab2e58b#diff-56dacac8e4a23c4e1d4f63562fa5d6d1R23 > ) > > It's unexpected for `#to_hash` to _not_ return a hash, e.g. [AwesomePrint]( > https://github.com/michaeldv/awesome_print) checks and uses `#to_hash` to > inspect hash-convertible objects, as noted in [an AwesomePrint issue]( > https://github.com/michaeldv/awesome_print/issues/215). > > Ruby core even expects `Hash` from `#to_hash`: > > > Hash.try_convert(ActiveRecord::Base.connection.select_all("select * > from users limit 1;")) > TypeError: can't convert ActiveRecord::Result to Hash > (ActiveRecord::Result#to_hash gives Array) > > `#to_ary` already exists with the same implementation, meaning that users > of `ActiveRecord::Result#to_hash` should really be using > `ActiveRecord::Result#to_a` > > -- > 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 [email protected]. > To post to this group, send email to [email protected]. > Visit this group at https://groups.google.com/group/rubyonrails-core. > For more options, visit https://groups.google.com/d/optout. > -- 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 [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/rubyonrails-core. For more options, visit https://groups.google.com/d/optout.
