title: Retrieving Collection from mLab
body: <p>I am using a MongoDB on mLab to store a basic collection of boardgames which I wish to show in my Ruby app. I have completed a tutorial that uses Mongoid to implement this locally, but so far I can't get it working with the mLab instance of the DB.</p>
  
  <p>I add this to my mongoid.yml file</p>
  
  <pre><code>development:
    clients:
      default:
        uri: 'mongodb://user:password@ds141232.mlab.com:41232/boardgame_banter'
  </code></pre>
  
  <p>The other options automatically generated in the config file, I have left blank (as default).</p>
  
  <p>I want to understand these 2 lines from the Terminal:</p>
  
  <pre><code>MONGODB | ds141232-a.mlab.com:41232 | boardgame_banter.find | STARTED | {"find"=&gt;"boardgames", "filter"=&gt;{}}
  MONGODB | ds141232-a.mlab.com:41232 | boardgame_banter.find | SUCCEEDED | 0.037816999999999996s
  </code></pre>
  
  <p><br>I get no errors, but also no documents returned and the generated index.html is blank...
  <br><br> Can anyone explain the first of the two lines MONGODB | ... to me, or at least confirm if my assumptions below are correct? Particularly the last part of the chain, is this telling me that the filtered results are empty?</p>
  
  <pre><code>MONGODB | &lt;&lt;hostname&gt;&gt; | &lt;&lt;database.find()&gt;&gt; | &lt;&lt;STATUS&gt;&gt; | {"find"=&gt;&lt;&lt;collection&gt;&gt;, "filter"=&gt;{&lt;&lt;no results??&gt;&gt;}}
  </code></pre>
  
  <p><br><strong>UPDATE</strong> after suggestion from @tfogo in the comments<br>
  In my controller:</p>
  
  <pre><code>  # GET /boardgames
    # GET /boardgames.json
    def index
      @boardgames = Boardgame.all
      @log = Boardgame.all.to_a
      puts "LOG: #{@log}"
    end
  </code></pre>
  
  <p>Which produces the following empty Log statement in the console:</p>
  
  <pre><code>    Started GET "/boardgames" for 127.0.0.1 at 2018-03-02 11:25:00 +0100
  Processing by BoardgamesController#index as HTML
  D, [2018-03-02T11:25:00.186878 #12983] DEBUG -- : MONGODB | ds141232-a.mlab.com:41232 | boardgame_banter.find | STARTED | {"find"=&gt;"boardgames", "filter"=&gt;{}}
  D, [2018-03-02T11:25:00.223330 #12983] DEBUG -- : MONGODB | ds141232-a.mlab.com:41232 | boardgame_banter.find | SUCCEEDED | 0.035911000000000005s
  LOG: [#&lt;Boardgame _id: 5a984b439de90b3769420f2d, name: nil, rating: nil, minplayer: nil, maxplayer: nil, duration: nil, owner: nil&gt;]
    Rendering boardgames/index.html.erb within layouts/application
  D, [2018-03-02T11:25:00.235908 #12983] DEBUG -- : MONGODB | ds141232-a.mlab.com:41232 | boardgame_banter.find | STARTED | {"find"=&gt;"boardgames", "filter"=&gt;{}}
  D, [2018-03-02T11:25:00.274734 #12983] DEBUG -- : MONGODB | ds141232-a.mlab.com:41232 | boardgame_banter.find | SUCCEEDED | 0.038311s
    Rendered boardgames/index.html.erb within layouts/application (42.3ms)
  Completed 200 OK in 127ms (Views: 76.9ms)
  </code></pre>