app.kluk.fr/app/controllers/home_controller.rb

15 lines
322 B
Ruby
Raw Normal View History

2026-02-20 10:30:12 +01:00
class HomeController < ApplicationController
allow_unauthenticated_access
def index
user = User.find_by(username: request.subdomain)
if user&.public?
@mode = user.current_mood
@history = user.history
render template: "moods/index"
else
redirect_to dashboard_path
end
end
end