Re: [Rails-core] Increase speed creating new array

2016-05-05 Thread Ufuk Kayserilioglu
or an array itself. -- Ufuk Kayserilioglu On 6 May 2016 at 00:29:29, Andrey Molchanov (neod...@gmail.com) wrote: Hi all, In some places new array creates as a Array(). If we replace it to a [], we increase performance about 1.7 times: def old_slow    Array(123) end def new_fast    [123] end B

Re: [Rails-core] Pessimistic Locking

2016-01-05 Thread Ufuk Kayserilioglu
that this support exists? If so, what kind of a scenario would still need it? [1]:  https://github.com/rails/rails/commit/392eeecc11a291e406db927a18b75f41b2658253 -- Ufuk Kayserilioglu On 5 January 2016 at 15:46:33, alexander.maz...@gmail.com (alexander.maz...@gmail.com) wrote: Here is one

Re: [Rails-core] Idea: `record.associations(reload: true)` instead of `record.associations(true)`

2015-07-14 Thread Ufuk Kayserilioglu
+1 There is even a name for that "magic `true`" parameter: "The Boolean Trap" http://ariya.ofilabs.com/2011/08/hall-of-api-shame-boolean-trap.html Ufuk Kayserilioglu On Tue, Jul 14, 2015 at 12:02 AM, Prem Sichanugrist wrote: > How do you guys feel about adding supp

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

2015-02-06 Thread Ufuk Kayserilioglu
break applications that are using it. -- Ufuk Kayserilioglu On 6 February 2015 at 17:50:24, Rafael Mendonça França (rafaelmfra...@gmail.com) wrote: Renaming this method is not an option. The main reason is: it should not be used by end users. It is an implementation detail of the framework

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

2015-02-06 Thread Ufuk Kayserilioglu
and experienced programmers. -- Ufuk Kayserilioglu On 6 February 2015 at 17:24:17, Nicolas Cavigneaux (n...@bounga.org) wrote: Le 6 févr. 2015 à 16:21, Jason Fleetwood-Boldt a écrit : > > Is Rails' API coded for the neophyte or the experienced dev? > > The eternal questio

Re: [Rails-core] Add ActionController::Parameters#dig to grab values out of nested params, failing gracefully

2014-11-11 Thread Ufuk Kayserilioglu
Hi Gabe, I'd recommend the small and very versatile andand gem for the use case that you mention. In that case, the use case becomes:   params[:order].andand[:shipping_info].andand[:country] loosing very little expressiveness, not having to revert to rescuing exceptions, etc. Best, --

[Rails-core] Add variant support to ActionMailer

2014-05-02 Thread Ufuk Kayserilioglu
er, if there is any interest/willingness to do so. Best, Ufuk Kayserilioglu -- 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 rubyonrai