名前付きスコープを作成しました:
class Activity
scope :active, where("active = ?", true)
has_many :attachments, :as => :attachable
accepts_nested_attributes_for :attachments
end
a = Activity.active
正常に動作しますが、関連付けa.attachments
はできません (NoMethodError: undefined method `attachments')