Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

Brian Morearty's latest activity

Saturday, February 12 2011
6421 Deprecate 'escape' parameter/option in three helper functions was created in Ruby on Rails
Friday, February 04 2011
6370 Fix for code sample in Time.zone= comment was updated in Ruby on Rails
  • Brian Morearty
    Brian Morearty commented at 5:20 PM

    Thanks, Santiago. I missed the little note about how to push doc changes at the end of the contributor guide.

    I've made the doc patch in docrails.

  • Brian Morearty
    • Tag changed from documentation, timezone to doc, documentation, timezone
    by Brian Morearty at 4:48 AM
  • Brian Morearty
    Brian Morearty created the ticket at 4:46 AM

    Hi,

    This is just a small update to the docs for Time.zone=.

    Even though Time.zone is thread-local, it will leak across requests within the same thread if you ha...

Thursday, February 03 2011
6246 Time.zone is broken in most every version of rails including 3.x was updated in Ruby on Rails
  • Brian Morearty
    Brian Morearty commented at 4:56 PM

    One more time.

        def set_time_zone
          old_time_zone, Time.zone = Time.zone, 'Mountain Time (US & Canada)'
          yield
        ensure
          Time.zone = old_tim...
  • Brian Morearty
    Brian Morearty commented at 4:55 PM

    Whoops, formatting error.

    @@@ Ruby def set_time_zone

    old_time_zone, Time.zone = Time.zone, 'Mountain Time (US & Canada)'
    yield
    

    ensure

    Time.zone = old_time_zo...
  • Brian Morearty
    Brian Morearty commented at 4:54 PM

    Hi,

    Regarding point #1, "Setting Time.zone persists across threads and even persists past each request; meaning setting this value changes the behavior of all t...

Wednesday, January 26 2011
6321 add improved version of Enumerable#include? was updated in Ruby on Rails
Friday, January 21 2011
6321 add improved version of Enumerable#include? was updated in Ruby on Rails
  • Brian Morearty
    Brian Morearty commented at 10:48 PM

    Sweet. Nice team effort!

  • Brian Morearty
    Brian Morearty commented at 9:29 PM

    Thanks, rubyduo. I also thought about combining them to get the best of both worlds. The problem is it will lead to ambiguous cases:

    names = ["Brian"]
    "B".in?(...