Files
docuseal/app/controllers/dashboard_controller.rb
T

15 lines
459 B
Ruby
Raw Normal View History

2023-05-21 17:59:36 +03:00
# frozen_string_literal: true
class DashboardController < ApplicationController
2023-06-19 21:44:41 +00:00
skip_before_action :authenticate_user!, only: %i[index]
2023-05-21 17:59:36 +03:00
def index
2023-07-14 22:33:42 +03:00
return redirect_to Docuseal::PRODUCT_URL, allow_other_host: true if Docuseal.multitenant? && !signed_in?
2023-06-19 21:44:41 +00:00
return render 'pages/landing' unless signed_in?
2023-06-28 00:22:34 +03:00
templates = current_account.templates.active.preload(:author).order(id: :desc)
@pagy, @templates = pagy(templates, items: 12)
2023-05-21 17:59:36 +03:00
end
end