Class: Backend::Forms::SubmissionsController

Inherits:
BaseController
  • Object
show all
Includes:
Concerns::PaginationController
Defined in:
app/controllers/backend/forms/submissions_controller.rb

Instance Method Summary collapse

Methods included from Concerns::PaginationController

#page_number, #paginate, #per_page

Instance Method Details

#destroyObject



14
15
16
17
18
# File 'app/controllers/backend/forms/submissions_controller.rb', line 14

def destroy
  @model.destroy
  redirect_to backend_forms_path,
              notice: translate_notice(:deleted, :form_submission)
end

#find_modelObject



20
21
22
# File 'app/controllers/backend/forms/submissions_controller.rb', line 20

def find_model
  @model = FormSubmission.find(params[:id])
end

#indexObject



10
11
12
# File 'app/controllers/backend/forms/submissions_controller.rb', line 10

def index
  @submissions = paginate(@form.submissions.order('id DESC'))
end