lib/morpheus/mixins/conversion.rb in morpheus-0.4.0 vs lib/morpheus/mixins/conversion.rb in morpheus-0.5.0
- old
+ new
@@ -1,22 +1,24 @@
module Morpheus
- module Conversion
+ module Mixins
+ module Conversion
- def to_model
- self
- end
+ def to_model
+ self
+ end
- def to_param
- id.to_s unless new_record?
- end
+ def to_param
+ id.to_s unless new_record?
+ end
- def to_key
- attributes.keys if persisted?
- end
+ def to_key
+ attributes.keys if persisted?
+ end
- def to_partial_path
- underscored_model_name = self.class.model_name.underscore
- "#{underscored_model_name.pluralize}/#{underscored_model_name}"
- end
+ def to_partial_path
+ underscored_model_name = self.class.model_name.underscore
+ "#{underscored_model_name.pluralize}/#{underscored_model_name}"
+ end
+ end
end
end