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.

Amos King's latest activity

Sunday, July 11 2010
5013 Clean try syntax was updated in Ruby on Rails
  • Amos King
    Amos King commented at 5:46 AM

    irb(main):003:0> require 'json'
    => true irb(main):005:0> Try = Class.new(BasicObject) { def method_missing(*) nil; end }
    => Try irb(main):006:0> Try.new.to_json
    ...

Wednesday, June 30 2010
5013 Clean try syntax was updated in Ruby on Rails
  • Amos King
    Amos King commented at 4:03 PM

    What if the implementation used BasicObject if the implementation is Ruby 1.9? I'm not in a place where I can test that right now.

  • Amos King
    Amos King commented at 3:00 PM

    Why not support both syntaxes for a little while, and see where the community goes with it. Then we can deprecate one, or maybe decide to keep both?

  • Amos King
    Amos King commented at 1:06 PM

    This patch supports both syntaxes.

  • Amos King
    • Tag changed from active_support, core_ext, patch, rails3 to active_support, core_ext, documentation, patch, rails3
    by Amos King at 5:44 AM

    I also updated the documentation in the same patch.

  • Amos King
    • Tag changed from active_support, core_ext, rails3 to active_support, core_ext, patch, rails3
    by Amos King at 5:42 AM

    here is a patch, and it keeps backwards compatibility.

1 earlier change…
  • Amos King
    Amos King created the ticket at 5:35 AM

    The syntax for try is really ugly with array/hash access. ie. list.try(:[],4)

    I would really like to see try return a proxy object when the original object is a...

Tuesday, June 15 2010
4858 ActionMailer is html escaping ampersand (&) in Urls in plain text messages was updated in Ruby on Rails
  • Amos King
    Amos King commented at 3:41 AM

    I can't reproduce this issue with the latest. Can I get an example so I can tackle this.

Wednesday, April 14 2010
3532 Print partial name in HTML, in development mode was updated in Ruby on Rails
  • Amos King
    Amos King commented at 2:04 AM

    I think it should stay as a patch. A framework should optimize because you don't know the end user's use case all the time, and if they have a lot of partals th...

Thursday, April 23 2009
2545 validations based on methods and not actual attributes was updated in Ruby on Rails
  • Amos King
    Amos King commented at 3:18 PM

    Rails should validate off of the attribute and save from the attribute. I'm not suggesting to change the save. The save currently works off of the attributes. I...