Class: Droom::GroupsController

Inherits:
EngineController show all
Defined in:
app/controllers/droom/groups_controller.rb

Instance Method Summary collapse

Instance Method Details

#createObject



39
40
41
42
43
44
45
# File 'app/controllers/droom/groups_controller.rb', line 39

def create
  if @group.save
    render :partial => "created"
  else
    respond_with @group
  end
end

#destroyObject



47
48
49
50
# File 'app/controllers/droom/groups_controller.rb', line 47

def destroy
  @group.destroy
  head :ok
end

#editObject



30
31
32
# File 'app/controllers/droom/groups_controller.rb', line 30

def edit
  respond_with @group
end

#indexObject



10
11
12
13
14
15
16
# File 'app/controllers/droom/groups_controller.rb', line 10

def index
  respond_with @groups do |format|
    format.js {
      render :partial => 'droom/groups/groups'
    }
  end
end

#newObject



18
19
20
# File 'app/controllers/droom/groups_controller.rb', line 18

def new
  respond_with @group
end

#showObject



22
23
24
25
26
27
28
# File 'app/controllers/droom/groups_controller.rb', line 22

def show
  respond_with @group do |format|
    format.js {
      render :partial => 'droom/groups/group'
    }
  end
end

#updateObject



34
35
36
37
# File 'app/controllers/droom/groups_controller.rb', line 34

def update
  @group.update_attributes(params[:group])
  render :partial => 'group'
end