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

Observer.observed_classes returns uninitialized constant

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

      Having,

      Unable to find source-code formatter for language: erb. Available languages are: actionscript, ada, applescript, bash, c, c#, c++, cpp, css, erlang, go, groovy, haskell, html, java, javascript, js, json, lua, none, nyan, objc, perl, php, python, r, rainbow, ruby, scala, sh, sql, swift, visualbasic, xml, yaml
      class EventObserver < Mongoid::Observer
        observe :comment, :message, :photo
        
        ...
      end
      

      Now when doing a EventObserver.observed_classes it should return an array of classes ([Comment, Message, Photo]), but it returns NameError: uninitialized constant Event.

      This was a know bug in Rails.

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

              Created:
              Updated:
              Resolved: