Hey @thetron, I have some code which clones a class, but for token classes I get an error.
Repro steps:
require 'mongoid'
require 'mongoid_token'
class Person
include Mongoid::Document
include Mongoid::Token
field :name
token
end
Person.clone
this line yields a NoMethodError.
I can't tell whether self.token = nil is a relic of a previous implementation or I just am missing something. As a work-around, I have added def self.token=(*); end to classes which include mongoid_token, but want to make sure I'm not setting myself up for some headaches down the road.
Thanks!
Hey @thetron, I have some code which clones a class, but for token classes I get an error.
Repro steps:
this line yields a NoMethodError.
I can't tell whether
self.token = nilis a relic of a previous implementation or I just am missing something. As a work-around, I have addeddef self.token=(*); endto classes which include mongoid_token, but want to make sure I'm not setting myself up for some headaches down the road.Thanks!