mirror of
https://github.com/maybe-finance/maybe.git
synced 2025-07-19 13:19:39 +02:00
* Bump min supported date to 20 years * Add basic onboarding * User onboarding * Complete onboarding flow * Cleanup, add user profile update test
17 lines
408 B
Ruby
17 lines
408 B
Ruby
module Onboardable
|
|
extend ActiveSupport::Concern
|
|
|
|
included do
|
|
before_action :redirect_to_onboarding, if: :needs_onboarding?
|
|
end
|
|
|
|
private
|
|
def redirect_to_onboarding
|
|
redirect_to onboarding_path
|
|
end
|
|
|
|
def needs_onboarding?
|
|
Current.user && Current.user.onboarded_at.blank? &&
|
|
!%w[/users /onboarding /sessions].any? { |path| request.path.start_with?(path) }
|
|
end
|
|
end
|