-
Type: Task
-
Resolution: Done
-
Affects Version/s: None
-
Component/s: None
-
Labels:None
As the title says, deleted models returns nil on calling to_param.
I'm using Mongoid::Paranoia to implement a simple trash mechanism in my web app, and the whole trash site can't be displayed because the generation of urls fails. I know, it's standard in ActiveModel, but together with Mongoid::Paranoia it makes no sense at all to return nil calling to_param on deleted models.
class Model include Mongoid::Document include Mongoid::Paranoia end model = Model.create model.destroy model.to_param # => nil