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

Concerning with concerns and indexes

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

      Hi,

      I was trying Concerns in my application and I found the following issue

      class User
        include Mongoid::Document
      
        # Concerns
        include Facebook
      
      end
      

      and the following concern, under

      Unable to find source-code formatter for language: appmodelsconcernsuserfacebook. 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
      .rb
      class User
        module Facebook
          extend ActiveSupport::Concern
      
          included do
            #some code
          end
      
          module ClassMethods
          end
        end
      end
      
      

      when I run

      Unable to find source-code formatter for language: rake. 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
       db:mongoid:create_indexes

      I have the following error:

      MONGOID: Attempted to constantize Concerns::User::Facebook, trying without namespacing.
      MONGOID: Failed to determine model from app/models/concerns/user/facebook.rb:
                  NameError:uninitialized constant Facebook
      

      this is not causing any issue in the application

      Rails 3.2.9, mongoid 3.0.15

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

              Created:
              Updated:
              Resolved: