app/models/unidom/common/concerns/model_extension.rb in unidom-common-0.3 vs app/models/unidom/common/concerns/model_extension.rb in unidom-common-0.4
- old
+ new
@@ -118,10 +118,14 @@
end
end
module ClassMethods
- # def method_name do end
+
+ def to_id(model)
+ model.respond_to?(:id) ? model.id : model
+ end
+
end
end
end
\ No newline at end of file