Module: SocialStream::Models::Subject::ClassMethods

Defined in:
lib/social_stream/models/subject.rb

Instance Method Summary collapse

Instance Method Details

#contact_index_modelsObject

The types of actors that appear in the contacts/index

You can customize this in each class



96
97
98
# File 'lib/social_stream/models/subject.rb', line 96

def contact_index_models
  SocialStream.contact_index_models
end

#find_by_slug(perm) ⇒ Object



84
85
86
# File 'lib/social_stream/models/subject.rb', line 84

def find_by_slug(perm)
  includes(:actor).where('actors.slug' => perm).first
end

#find_by_slug!(perm) ⇒ Object



88
89
90
91
# File 'lib/social_stream/models/subject.rb', line 88

def find_by_slug!(perm)
  find_by_slug(perm) ||
    raise(ActiveRecord::RecordNotFound)
end