Module: Rexport::ExportItemsControllerMethods

Defined in:
lib/rexport/export_items_controller_methods.rb

Instance Method Summary collapse

Instance Method Details

#destroyObject



17
18
19
20
21
22
# File 'lib/rexport/export_items_controller_methods.rb', line 17

def destroy
  @export_item = ExportItem.find(params[:id])
  @export_item.destroy
  
  redirect_to export_path(@export_item.export)
end

#editObject



3
4
5
# File 'lib/rexport/export_items_controller_methods.rb', line 3

def edit
  @export_item = ExportItem.find(params[:id])
end

#updateObject



7
8
9
10
11
12
13
14
15
# File 'lib/rexport/export_items_controller_methods.rb', line 7

def update
  @export_item = ExportItem.find(params[:id])
  
  if @export_item.update_attributes(export_item_params)
    redirect_to export_path(@export_item.export), notice: 'ExportItem was successfully updated.'
  else
    render :edit
  end
end