class Machinist::Mongoid::Lathe
Public Instance Methods
assign_attribute(key, value)
click to toggle source
# File lib/machinist/mongoid.rb, line 72 def assign_attribute(key, value) @assigned_attributes[key.to_sym] = value if @object.respond_to?("#{key}=") @object.send("#{key}=", value) else @object[key] = value end end
Private Instance Methods
relations_for(obj)
click to toggle source
# File lib/machinist/mongoid.rb, line 83 def relations_for(obj) if ::Mongoid::VERSION =~ /^4\./ obj.relations else obj.associations end end