Problem. To avoid creating multiple objects or multiple queries when possible.
I use Leaders with rails as a best practice.
I am following tips that say it would be useful to use "extend ActiveSupport.Memoizable" (and then memoize: method (s) to use them) over setting up elements with the style of @the_record = record ||= @record because of several problems - false or nil not to get the request to be called again, and also that memoizable uses the cache better (i.e. uses it!).
However, I see that memoizable is becoming obsolete on rails 3.1 Notes I github under the carrier and with the expression: "DEPARTMENT WARNING: ActiveSupport :: Memoizable is deprecated and will be removed in future releases, use the memoization Ruby template instead. (Called from the sequel at / Users / kain / .rvm / gems / ruby-1.9.3-preview1 / bundler / gems / carrierwave -c4459179b0f8 / Library / carrierwave / mount.rb: 284 "
Maybe it was allowed? Somebody knows?
Any suggestions for future best practices? Use syntax || =? How about the above issues?

source share