Displaying 1 result from an estimated 1 matches for "another_logo".
2008 Sep 29
1
has_one :through with :source. How to alias association?
...logo, :through => :attachment, :source => :attachable,
:source_type => ''Maker'', :dependent => :destroy,
:conditions => [''attachments.content_type = ?'',
''image/jpeg'' ]
produces the same results of:
has_one :another_logo, :class_name => ''Attachment'', :foreign_key =>
''attachable_id'', :conditions => [''attachable_type = ?'', ''Maker'' ]
Which one is the best approach to achieve the desired result?
Thanks in advance for your help
--
Posted...