app/models/comment.rb
# the image url being commented on, if it's an image
the image url being commented on, if it's an image
the image url being commented on if it ' s an image
def parent_image_url
    return_url = case self.parent_type
     when 'DataObject' then
        d=DataObject.find_by_id(self.parent_id)
        d.image? ? d.smart_thumb : ''
     else ''
    end
    return return_url
  end
def parent_image_url return_url = case self . parent_type when 'DataObject' then d = DataObject . find_by_id ( self . parent_id ) d . image? ? d . smart_thumb : '' else '' end return return_url end
the image url being commented on, if it's an image
the image url being commented on if it ' s an image