Flowdock

Notes posted by roryokane

RSS feed
May 25, 2016
0 thanks
May 25, 2016 - (v1.0.0 - v3.1.0)
0 thanks
July 24, 2012
1 thank

rest of code is in Object#try

The logic for #try is shared between this method and Object#try“Show source” here doesn’t show the whole story. Both methods are currently implemented in the file activesupport/lib/active_support/core_ext/object/try.rb .

July 24, 2012
3 thanks

rest of code is in NilClass#try

If you click “Show source” here, you may get confused. The logic for #try is shared between this method and NilClass#try . Both versions are currently implemented in the file activesupport/lib/active_support/core_ext/object/try.rb .

July 9, 2012
0 thanks

this has been deprecated; replace with Memoist

In Rails 3.2, memoize has been deprecated. In edge Rails, it has been removed.

The commit when it was deprecated: http://github.com/rails/rails/commit/36253916b0b788d6ded56669d37c96ed05c92c5c

A Stack Overflow question about this change: http://stackoverflow.com/q/9132197/578288

I personally disagree with the removal of memoize, and don’t recommend using the `||=` pattern Rails now suggests. The exception is if your entire program only memoizes something once or twice, so it’s not worth including a gem for.

The easiest way to keep using memoize is to use the Memoist gem (http://github.com/matthewrudy/memoist , http://rubygems.org/gems/memoist), which is a simple extraction of ActiveSupport::Memoizable into its own gem.

June 28, 2012
0 thanks

see also – similar methods

See also DateTime#strftime and Date#strftime . (They work similarly, but have different APIdock notes.)

June 28, 2012
0 thanks

see also – similar methods

See also Time#strftime and DateTime#strftime . (They work similarly, but have different APIdock notes.)

June 28, 2012
0 thanks

see also – similar methods

See also Time#strftime and Date#strftime . (They work similarly, but have different APIdock notes.)

April 30, 2012 - (>= v3.1.0)
0 thanks

method to use instead

This may be obvious, but the replacement for this method is csrf_meta_tags.