Class: Smriti::Admin::MatViewRunsController
- Inherits:
-
ApplicationController
- Object
- ActionController::Base
- ApplicationController
- Smriti::Admin::MatViewRunsController
- Includes:
- DatatableHelper
- Defined in:
- app/controllers/smriti/admin/mat_view_runs_controller.rb
Overview
Smriti::Admin::MatViewRunsController
Controller for viewing materialised view run history in the admin UI.
Responsibilities:
- Provides a list of recent runs (create/refresh/delete) for all definitions.
- Shows details for an individual run in a Turbo frame/drawer context.
Filters:
before_action :ensure_frame→ enforces frame-only access.before_action :set_mat_view_run→ loads and authorizes a single run.
Views:
- Index renders
smriti/admin/runs/embed_framepartial. - Show renders
smriti/admin/runs/embed_show_drawerpartial.
Instance Method Summary collapse
-
#index ⇒ void
GET /:lang/admin/runs.
-
#show ⇒ void
GET /:lang/admin/runs/:id.
Methods included from AuthBridge
Instance Method Details
#index ⇒ void
This method returns an undefined value.
GET /:lang/admin/runs
Two part rendering:
- Full page load when no
streamparam: renders index with datatable frame. This is essentially shell of the datatable for initial load. - When shell is loaded, it requests the
streamversion which renders just the datatable rows and pagination controls. This allows for dynamic updates via Turbo Streams.
43 44 45 46 47 48 49 50 51 52 53 |
# File 'app/controllers/smriti/admin/mat_view_runs_controller.rb', line 43 def index (:read, :smriti_runs) assign_index_state if params[:stream].present? render_dt_turbo_streams else render 'index', formats: :html, layout: 'smriti/turbo_frame', locals: { row_meta: @row_meta } end end |
#show ⇒ void
This method returns an undefined value.
GET /:lang/admin/runs/:id
Displays details for a single run.
60 61 62 63 64 |
# File 'app/controllers/smriti/admin/mat_view_runs_controller.rb', line 60 def show (:read, :smriti_run, @run) render 'show', formats: :html, layout: 'smriti/turbo_frame' end |