Module: SslRequirement::ClassMethods
- Defined in:
- lib/ssl_requirement.rb
Instance Method Summary collapse
-
#ssl_allowed(*actions) ⇒ Object
To allow SSL for any action pass :all as action like this: ssl_allowed :all.
- #ssl_exceptions(*actions) ⇒ Object
-
#ssl_required(*actions) ⇒ Object
Specifies that the named actions requires an SSL connection to be performed (which is enforced by ensure_proper_protocol).
Instance Method Details
#ssl_allowed(*actions) ⇒ Object
To allow SSL for any action pass :all as action like this: ssl_allowed :all
91 92 93 94 |
# File 'lib/ssl_requirement.rb', line 91 def ssl_allowed(*actions) self.ssl_allowed_actions ||= [] self.ssl_allowed_actions += actions end |
#ssl_exceptions(*actions) ⇒ Object
84 85 86 87 |
# File 'lib/ssl_requirement.rb', line 84 def ssl_exceptions(*actions) self.ssl_required_except_actions ||= [] self.ssl_required_except_actions += actions end |
#ssl_required(*actions) ⇒ Object
Specifies that the named actions requires an SSL connection to be performed (which is enforced by ensure_proper_protocol).
79 80 81 82 |
# File 'lib/ssl_requirement.rb', line 79 def ssl_required(*actions) self.ssl_required_actions ||= [] self.ssl_required_actions += actions end |