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.

David Yip's latest activity

Monday, March 09 2009
2172 Nested model forms error on loading data from belongs_to associations that ev... was updated in Ruby on Rails
  • David Yip
    David Yip commented at 4:02 PM

    I think exceptions would be fine; I personally haven't had a need for using forms on schemas that don't match what is expected by the form.

    However, form_for do...

  • David Yip
    David Yip commented at 4:10 AM

    Yeah, there's definitely times where the model is a more appropriate location for this sort of initialization code.

    Here's another patch that implements the "do...

Sunday, March 08 2009
2172 Nested model forms error on loading data from belongs_to associations that ev... was updated in Ruby on Rails
  • David Yip
    David Yip commented at 8:06 PM

    Hmm, let me make sure I understand the proposal.

    In this case, if post.author is nil, then the render result for

    
    <% form_for @post do |f| %>
      <% f.fields_f...
  • David Yip
    • Title changed from Nested model forms error on loading data from one-to-one associations that evaluate to nil to Nested model forms error on loading data from belongs_to associations that evaluate to nil
    by David Yip at 11:05 AM
  • David Yip
    David Yip commented at 11:02 AM

    Here's a manual test in the form of a small Rails application that exercises the full stack in a scenario similar to the one in the problem description. To exer...

  • David Yip
    David Yip created the ticket at 10:56 AM

    When a belongs_to association called in a nested model form construction context evaluates to nil, new_record? is invoked on nil, which causes an error to be ra...