Class: GroupsController

Inherits:
InheritedResources::Base
  • Object
show all
Defined in:
app/controllers/groups_controller.rb

Instance Method Summary collapse

Instance Method Details

#createObject



25
26
27
28
29
30
31
32
# File 'app/controllers/groups_controller.rb', line 25

def create
  create! do |success, failure|
    success.html {
      self.current_subject = @group
      redirect_to :home
    }
  end
end

#destroyObject



34
35
36
37
38
39
40
41
# File 'app/controllers/groups_controller.rb', line 34

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

#indexObject



12
13
14
15
16
17
18
19
20
# File 'app/controllers/groups_controller.rb', line 12

def index
  @groups = Group.most(params[:most]).
                  alphabetic.
                  letter(params[:letter]).
                  name_search(params[:search]).
                  tagged_with(params[:tag]).
                  page(params[:page]).per(10)

end

#showObject



22
23
# File 'app/controllers/groups_controller.rb', line 22

def show
end