Module: InvitationOnlyHelper
- Defined in:
- app/helpers/invitation_only_helper.rb
Instance Method Summary collapse
Instance Method Details
#invited? ⇒ Boolean
4 5 6 7 8 9 10 11 12 |
# File 'app/helpers/invitation_only_helper.rb', line 4 def invited? return false unless session[:invitation_key].present? result = invitation_keys.find do |key| ActiveSupport::SecurityUtils.secure_compare(key, session[:invitation_key]) end result.present? end |
#show_sign_up_options? ⇒ Boolean
14 15 16 17 |
# File 'app/helpers/invitation_only_helper.rb', line 14 def return true unless invitation_only? invited? end |