Note that there are some explanatory texts on larger screens.

plurals
  1. PODateTime with MongoDB/Mongoid and Rails 3 Not Populating
    primarykey
    data
    text
    <p>Here is the code in my Model</p> <pre><code> include Mongoid::Document include Mongoid::Timestamps field :message, :type =&gt; String field :send_at, :type =&gt; DateTime </code></pre> <p>Here is the code for my form partial</p> <pre><code> &lt;%= f.label :send_at %&gt;&lt;br /&gt; &lt;%= f.datetime_select :send_at %&gt; </code></pre> <p>But the date and time is never populated. I made sure that Mongo and Mongoid are up to date as well. Not sure if there's something I'm missing.</p> <p>[UPDATE LOG ENTRIES]</p> <pre><code>Started POST "/notifis" for 127.0.0.1 at Mon Oct 18 05:48:05 -0400 2010 Processing by NotifisController#create as HTML Parameters: {"commit"=&gt;"Create Notifi", "authenticity_token"=&gt;"/hrlnvA2Xn5NqGgCkPFAQV254IHPJEvZoLxOYNNUwhc=", "_snowman"=&gt;"☃", "notifi"=&gt;{"send_at(2i)"=&gt;"10", "is_sent"=&gt;"0", "send_at(3i)"=&gt;"18", "send_at(4i)"=&gt;"09", "message"=&gt;"erwer", "send_at(5i)"=&gt;"48", "send_at(1i)"=&gt;"2010"}} MONGODB noti_development['notifis'].insert([{"send_at(2i)"=&gt;"10", "created_at"=&gt;Mon Oct 18 09:48:05 UTC 2010, "is_sent"=&gt;false, "updated_at"=&gt;Mon Oct 18 09:48:05 UTC 2010, "_id"=&gt;BSON::ObjectID('4cbc17d5c24d7602bc00002d'), "send_at(3i)"=&gt;"18", "message"=&gt;"Sample Message", "send_at(4i)"=&gt;"09", "send_at(1i)"=&gt;"2010", "send_at(5i)"=&gt;"48"}]) Redirected to http://localhost:3000/notifis Completed 302 Found in 4ms Started GET "/notifis" for 127.0.0.1 at Mon Oct 18 05:48:05 -0400 2010 Processing by NotifisController#index as HTML MONGODB noti_development['users'].find({:_id=&gt;BSON::ObjectID('4cb9db18c24d7602bc000007')}, {}).limit(-1) MONGODB noti_development['notifis'].find({}, {}) Rendered notifis/index.html.erb within layouts/application (42.0ms) Completed 200 OK in 52ms (Views: 51.2ms) </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload