Sha256: fdbd61825ce148de791212569a85a9f6075509c75e0c717820514ad85b5425d5

Contents?: true

Size: 325 Bytes

Versions: 7

Compression:

Stored size: 325 Bytes

Contents

require 'og/relation/refers_to'

module Og

class BelongsTo < RefersTo

  def enchant
    super
    unless target_class.ann.self[:descendants]
      target_class.ann(:self, :descendants => [])
    end
    target_class.ann.self.descendants! << [owner_class, foreign_key]
  end
  
end

end

# * George Moschovitis <gm@navel.gr>

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
og-0.27.0 lib/og/relation/belongs_to.rb
og-0.25.0 lib/og/relation/belongs_to.rb
og-0.26.0 lib/og/relation/belongs_to.rb
og-0.28.0 lib/og/relation/belongs_to.rb
og-0.29.0 lib/og/relation/belongs_to.rb
og-0.30.0 lib/og/relation/belongs_to.rb
og-0.31.0 lib/og/relation/belongs_to.rb