Closed ghost closed 10 years ago
I really don't know. I don't use Rails nor mongo nowadays. Sorry. If you can figure it out and fix it. I can add you as a committer.
ok I'll take a look
I got it working with this:
require 'duration/mongoid'
class Price
include Mongoid::Document
field :duration, type: Duration
end
price = Price.new
price.duration = 90
price.duration.minutes # => 1
price.duration.seconds # => 30
Think you can close it.
I use mongoid 3
Hi,
I'm trying to assign duration to a field. Using Rails 4.1 and Mongoid 4 Is it not working with this stack or am I doing something wrong? Here is what I do: