Class: GroupsController

Inherits:
ApplicationController
  • Object
show all
Includes:
SocialStream::Controllers::Authorship, SocialStream::Controllers::Subjects
Defined in:
app/controllers/groups_controller.rb

Instance Method Summary collapse

Methods included from SocialStream::Controllers::Subjects

#profile_subject

Instance Method Details

#createObject



15
16
17
18
19
20
21
22
23
24
25
26
# File 'app/controllers/groups_controller.rb', line 15

def create
  create! do |success, failure|
    success.html {
      self.current_subject = resource

      flash[:notice] += t('representation.notice',
                           :subject => resource.name)

      redirect_to :home
    }
  end
end

#destroyObject



28
29
30
31
32
33
34
35
# File 'app/controllers/groups_controller.rb', line 28

def destroy
  destroy! do |success, failure|
    success.html {
      self.current_subject = current_user
      redirect_to :home
    }
  end
end

#indexObject

Raises:

  • (ActiveRecord::RecordNotFound)


11
12
13
# File 'app/controllers/groups_controller.rb', line 11

def index
  raise ActiveRecord::RecordNotFound
end