Class: ActivityVerb

Inherits:
ActiveRecord::Base
  • Object
show all
Defined in:
app/models/activity_verb.rb

Constant Summary collapse

Available =

Activity Strems verbs

%w(follow like make-friend post update join)

Class Method Summary collapse

Class Method Details

.[](name) ⇒ Object



14
15
16
17
18
19
20
# File 'app/models/activity_verb.rb', line 14

def [] name
  if Available.include?(name)
    find_or_create_by_name name
  else
    raise "ActivityVerb not available: #{ name }"
  end
end