Method: Blazer::DashboardsController#create

Defined in:
app/controllers/blazer/dashboards_controller.rb

#createObject



9
10
11
12
13
14
15
16
17
18
19
20
# File 'app/controllers/blazer/dashboards_controller.rb', line 9

def create
  @dashboard = Blazer::Dashboard.new
  # use creator_id instead of creator
  # since we setup association without checking if column exists
  @dashboard.creator = blazer_user if @dashboard.respond_to?(:creator_id=) && blazer_user

  if update_dashboard(@dashboard)
    redirect_to dashboard_path(@dashboard)
  else
    render_errors @dashboard
  end
end