Class: Hotsheet::SheetsController

Inherits:
ApplicationController show all
Defined in:
app/controllers/hotsheet/sheets_controller.rb

Instance Method Summary collapse

Instance Method Details

#indexObject



8
9
10
11
# File 'app/controllers/hotsheet/sheets_controller.rb', line 8

def index
  @columns = @sheet.columns
  @cells, @config = @sheet.cells_for @columns, params
end

#updateObject



13
14
15
16
17
18
19
# File 'app/controllers/hotsheet/sheets_controller.rb', line 13

def update
  if @resource.update params[:column_name] => params[:value]
    respond
  else
    respond @resource.errors.full_messages.first
  end
end