Source: show
# File app/models/concerns/analytics/contentable.rb, line 10 def content @content_type ||= content_type.constantize.find(content_id) rescue ActiveRecord::RecordNotFound OpenStruct.new end
# File app/models/concerns/analytics/contentable.rb, line 3 def content=(content_instance) self.content_type = content_instance.class.name self.content_id = content_instance.id @content = content_instance end