Sha256: 19c4358c8ec2c6dbc09db78eb47427bdf666616f2db581fc37588b1bf14b10f4
Contents?: true
Size: 445 Bytes
Versions: 7
Compression:
Stored size: 445 Bytes
Contents
# A model to contain mentions of the :owner in the media class Mention < ActiveRecord::Base belongs_to :owner, :polymorphic => true scope :since, lambda { |d| where(["mentions.date > ?", d]) } # Returns the mentions in JSON form # # @params [Hash] A hash of options # @return The mentions in JSON form def as_json(opts = {}) default_opts = {:except => [:owner_id, :owner_type]} super(default_opts.merge(opts)) end end
Version data entries
7 entries across 4 versions & 2 rubygems