Class: Droom::ScrapsController

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

Instance Method Summary collapse

Instance Method Details

#createObject



35
36
37
38
# File 'app/controllers/droom/scraps_controller.rb', line 35

def create
  @scrap.update_attributes(params[:scrap])
  respond_with(@scrap)
end

#destroyObject



40
41
42
43
# File 'app/controllers/droom/scraps_controller.rb', line 40

def destroy
  @scrap.destroy
  head :ok
end

#editObject



26
27
28
# File 'app/controllers/droom/scraps_controller.rb', line 26

def edit
  respond_with(@scrap)
end

#feedObject



45
46
47
# File 'app/controllers/droom/scraps_controller.rb', line 45

def feed
  
end

#indexObject



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

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

#newObject



22
23
24
# File 'app/controllers/droom/scraps_controller.rb', line 22

def new
  respond_with(@scrap)
end

#showObject



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

def show
  respond_with(@scrap)
end

#updateObject



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

def update
  @scrap.update_attributes(params[:scrap])
  respond_with(@scrap)
end