Skip to content

Instantly share code, notes, and snippets.

@adamgamble
Forked from dchapman1988/breaking_news.rb
Created November 7, 2011 16:21
Show Gist options
  • Save adamgamble/1345421 to your computer and use it in GitHub Desktop.
Save adamgamble/1345421 to your computer and use it in GitHub Desktop.
def self.is_breaking_news? object
where("breaking_newsable_type = ? AND breaking_newsable_id = ?", object.class.to_s, object.id).first
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment