Module: Vidibus::Uuid::Mongoid
- Extended by:
- ActiveSupport::Concern
- Defined in:
- lib/vidibus/uuid/mongoid.rb
Instance Method Summary collapse
-
#to_param ⇒ Object
Returns UUID as param for URLs.
Instance Method Details
#to_param ⇒ Object
Returns UUID as param for URLs. If the UUID has been changed to an invalid value, the old uuid will be returned.
16 17 18 19 20 21 22 |
# File 'lib/vidibus/uuid/mongoid.rb', line 16 def to_param if uuid_changed? and uuid_was and !Vidibus::Uuid.validate(uuid) uuid_was else uuid end end |