Permalink
Commits on Aug 7, 2012
  1. accepts_nested_attributes_for + :finder_sql => parent_id included

    When using accepts_nested_attributes_for on an association that uses
    :finder_sql, the "#{parent.class.name.to_s.downcase}_id" column gets
    included in the generated SQL query.
    
    The object id suffices in itself, there is no need to include the parent
    id, which doesn't exist, as the association is synthetic.
    There is no need to even have a valid path from a Host to the
    LookupValue: if the LookupValue references the Host name, the former
    should be listed in the latter
    (hence many :through associations cannot do).
    
        Host -> Puppetclass -> Lookup key -> Lookup value
             `----------------------------´
    ofavre committed Aug 7, 2012