Class: Nquery::Collection::DashboardsController
- Inherits:
-
ApplicationController
- Object
- ActionController::Base
- ApplicationController
- Nquery::Collection::DashboardsController
- Includes:
- Browsable
- Defined in:
- app/controllers/nquery/collection/dashboards_controller.rb
Constant Summary
Constants included from AuthorizesCollection
AuthorizesCollection::COLLECTION_REQUIREMENTS
Instance Method Summary collapse
Methods included from Breadcrumbs
#breadcrumbs, #set_breadcrumbs
Instance Method Details
#create ⇒ Object
14 15 16 17 18 19 20 21 22 |
# File 'app/controllers/nquery/collection/dashboards_controller.rb', line 14 def create @dashboard = Dashboard.new(dashboard_params.merge(collection: @collection, creator: current_nquery_user)) if @dashboard.save redirect_to dashboard_path(@dashboard), notice: "Dashboard created." else render :new, status: :unprocessable_content end end |
#new ⇒ Object
10 11 12 |
# File 'app/controllers/nquery/collection/dashboards_controller.rb', line 10 def new @dashboard = Dashboard.new(collection: @collection) end |