mirror of
https://github.com/neocities/neocities.git
synced 2025-07-11 21:38:15 +02:00
add logic for tutorial requirement
This commit is contained in:
parent
01aab733bb
commit
2ff8365651
9 changed files with 32 additions and 9 deletions
|
@ -38,5 +38,15 @@ get '/tutorial/:section/:page/?' do
|
|||
|
||||
@title = "#{params[:section].upcase} Tutorial - #{@page}/10"
|
||||
|
||||
|
||||
if @page == '9'
|
||||
unless csrf_safe?
|
||||
signout
|
||||
redirect '/'
|
||||
end
|
||||
current_site.tutorial_required = false
|
||||
current_site.save_changes validate: false
|
||||
end
|
||||
|
||||
erb "tutorial/layout".to_sym
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue