Eager loading not working with default_scope

XMLWordPrintableJSON

    • Type: Task
    • Resolution: Done
    • 2.4.4
    • Affects Version/s: None
    • Component/s: None
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Looks like the default_scope in this example is a no-op:

      class Post
      	include Mongoid::Document
      
      	default_scope includes(:tags)
      
      	field :title, type: String
      
      	has_many :tags
      
      	validates_presence_of :tags
      end
      
      class Tag
      	include Mongoid::Document
      
      	field :title, type: String
      
      	belongs_to :post
      end
      

            Assignee:
            Durran Jordan
            Reporter:
            behrangsa
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: