Uploaded image for project: 'Mongoid'
  1. Mongoid
  2. MONGOID-2640

default_scope with runtime persistence

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

      Seems not to be possible to perform a default_scope like this:

      class Band
      include Mongoid::Document
      default_scope ->

      { with(database: '"db_one") }

      end

      I get:
      NoMethodError: undefind method 'to_crteria' for Band:Class

            Assignee:
            Unassigned Unassigned
            Reporter:
            nubeod nubeod
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: