Class: CompletionKit::OnboardingController
Constant Summary
ApplicationController::ONBOARDING_DISMISS_COOKIE
Instance Method Summary
collapse
Instance Method Details
#dismiss ⇒ Object
11
12
13
14
|
# File 'app/controllers/completion_kit/onboarding_controller.rb', line 11
def dismiss
cookies[ONBOARDING_DISMISS_COOKIE] = { value: "1", expires: 1.year.from_now, httponly: true }
redirect_to dashboard_path, notice: "Setup skipped. Pick it back up from Settings → Getting started any time."
end
|
#sample_data ⇒ Object
16
17
18
19
|
# File 'app/controllers/completion_kit/onboarding_controller.rb', line 16
def sample_data
Onboarding::SampleData.install!
redirect_to onboarding_path, notice: "Loaded a sample dataset and prompt — edit or delete them whenever."
end
|
#show ⇒ Object
3
4
5
6
7
8
9
|
# File 'app/controllers/completion_kit/onboarding_controller.rb', line 3
def show
cookies.delete(ONBOARDING_DISMISS_COOKIE) if params[:reset]
@checklist = Onboarding::Checklist.new
return if params[:reset]
redirect_to dashboard_path if workspace_ready?
end
|