Class: Comment
- Inherits:
-
Object
- Object
- Comment
- Includes:
- Mongoid::Document
- Defined in:
- app/models/comment.rb
Instance Method Summary collapse
Instance Method Details
#resource ⇒ Object
21 22 23 |
# File 'app/models/comment.rb', line 21 def resource @resource ||= self.resource_class.camelize.constantize.find(self.resource_id) unless resource_class.blank? or resource_id.blank? end |