adjust dashboard templates style

This commit is contained in:
Alex Turchyn
2023-06-28 00:22:34 +03:00
parent 897df83633
commit 9c9c1ad6f0
14 changed files with 166 additions and 150 deletions
+3 -7
View File
@@ -1,11 +1,7 @@
# frozen_string_literal: true
class SubmissionsController < ApplicationController
before_action :load_template, only: %i[index new create]
def index
@pagy, @submissions = pagy(@template.submissions.active)
end
before_action :load_template, only: %i[new create]
def show
@submission =
@@ -32,7 +28,7 @@ class SubmissionsController < ApplicationController
end
end
redirect_to template_submissions_path(@template),
redirect_to template_path(@template),
notice: "#{submissions.size} #{'recipient'.pluralize(submissions.size)} added"
end
@@ -42,7 +38,7 @@ class SubmissionsController < ApplicationController
submission.update!(deleted_at: Time.current)
redirect_to template_submissions_path(submission.template), notice: 'Submission has been archived'
redirect_back(fallback_location: template_path(submission.template), notice: 'Submission has been archived')
end
private