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.

Lawrence Pit's latest activity

Sunday, May 02 2010
2036 Linking and unlinking via accepts_nested_attributes_for was updated in Ruby on Rails
  • Lawrence Pit
    Lawrence Pit commented at 10:23 AM

    fyi: I'm going to pursue this via various new tickets. First step is done, which allows linking/unlinking of records from a habtm assocation using :autosave => ...

4521 HABTM: ability to link and unlink records with :autosave => true was created in Ruby on Rails
  • Lawrence Pit
    Lawrence Pit created the ticket at 10:19 AM

    Attached patch for rails 3 allows to link and unlink records from a HABTM relation with autosave. Meaning the association updates will only be reflected in the ...

Friday, April 30 2010
3486 Alternative to validates_uniqueness_of using db constraints was updated in Ruby on Rails
  • Lawrence Pit
    Lawrence Pit commented at 8:17 AM

    +1 on the idea, not for the implementation as is. I don't believe these constraint errors are always presented in English Instead of checking for English words ...

4499 respond_with accepting options to pass on to to_xml and to_json was updated in Ruby on Rails
  • Lawrence Pit
    • Assigned user cleared.
    by Lawrence Pit at 1:41 AM

    I hadn't, but just tried. So the options are now passed on, yes. Unfortunately, the to_xml method contains a bug, for which I opened a separate ticket: https:/...

4506 to_xml with :include should skip_instruct on the included records was created in Ruby on Rails
  • Lawrence Pit
    Lawrence Pit created the ticket at 1:40 AM

    When calling e.g. record.to_xml(@person, :include => [:company]) the xml output has multiple xml instruct elements. For example:

    <?xml version="1.0" encoding="...
Thursday, April 29 2010
4499 respond_with accepting options to pass on to to_xml and to_json was created in Ruby on Rails
  • Lawrence Pit
    Lawrence Pit created the ticket at 2:10 PM

    Using rails 3 beta 3. In Rails 2 you could do:

       format.xml  { render :xml => @person.to_xml(:include => @company) }
    

    In rails 3 it's preferred to simply do:

    ...
Wednesday, April 28 2010
4493 ActiveRecord middleware should be inserted before ActionDispatch::Cascade ? was updated in Ruby on Rails
  • Lawrence Pit
    Lawrence Pit commented at 8:11 AM

    Actually, just found out that all my middlewares are sitting before ActiveRecord::ConnectionAdapters::ConnectionManagement. Perhaps the position of ActionDispat...

  • Lawrence Pit
    Lawrence Pit created the ticket at 1:41 AM

    Using rails 3 beta 3. I have a piece of metal code, and I think it's fair to assume that most users will use some ActiveRecord code in there to retrieve some da...

4492 rake middleware not working in rails3 beta 3 was updated in Ruby on Rails
  • Lawrence Pit
    Lawrence Pit commented at 8:06 AM

    I've moved it to config/application.rb, and now I see the stack. Thnx.

    The reason I'd put it in environment.rb is because that's what's being advertised everywh...

  • Lawrence Pit
    Lawrence Pit created the ticket at 12:19 AM

    I'm on rails 3 beta 3, and defined to use a middleware in environment.rb:

        MyApp::Application.configure do
           config.middleware.use '::ExceptionNotifier...