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.

Paul Alexander's latest activity

Wednesday, March 30 2011
6655 String.to_json creates invalid JSON was updated in Ruby on Rails
  • Paul Alexander
    Paul Alexander commented at 11:08 PM

    Rechecking my logic '"'.to_json should == '"\""'. Not sure where the &quote; thing is coming from. Must be from another gem.

  • Paul Alexander
    Paul Alexander commented at 11:06 PM

    Sorry...forgot this was markdown

    # rails new sample
    # cd sample
    # rails console
    
    > '"'.to_json                     # => "\"\\\"\""
    > '"'.to_json == '\"'      ...
  • Paul Alexander
    Paul Alexander commented at 11:04 PM

    ...worked out a sample

    rails new sample

    cd sample

    rails console

    '"'.to_json # => ""\""" '"'.to_json == '"' # => false

  • Paul Alexander
    Paul Alexander commented at 10:52 PM

    Sure...but I' not sure how to prep one. I have my own application with specs and tests and I can repeatedly produce this result...is there a standard way of sub...

  • Paul Alexander
    Paul Alexander created the ticket at 8:46 PM

    '"Now is the time..."'.to_json

    should return

    '&quote;Now is the time...&quote;'

    but instead includes additional escapes

    "\&quote;Now is the time...\&quote;"

Wednesday, February 23 2011
2388 feature patch: config.active_record.raise_on_illegal_mass_assignment option was updated in Ruby on Rails