Sha256: 47c0d5f1bba50bb4f987471b258c8d879ee381a81df51bcc06abc01c44534a13
Contents?: true
Size: 415 Bytes
Versions: 8
Compression:
Stored size: 415 Bytes
Contents
class ActivityVerb < ActiveRecord::Base # Activity Strems verbs Available = %w( post update like ) validates_uniqueness_of :name has_many :activities scope :verb_name, lambda{ |n| where(:name => n) } class << self def [] name if Available.include?(name) find_or_create_by_name name else raise "ActivityVerb not available: #{ name }" end end end end
Version data entries
8 entries across 8 versions & 1 rubygems