Module: AuthAssistant::ViewHelpers::SessionLink
- Included in:
- AuthAssistant::ViewHelpers
- Defined in:
- lib/auth_assistant/view/session_link.rb
Instance Method Summary collapse
- #sign_in_link(label, options = {}) ⇒ Object (also: #log_in_link)
- #sign_out_link(options = {}) ⇒ Object (also: #log_out_link)
Instance Method Details
#sign_in_link(label, options = {}) ⇒ Object Also known as: log_in_link
10 11 12 13 14 |
# File 'lib/auth_assistant/view/session_link.rb', line 10 def sign_in_link(label, = {}) label = [:label] || auth_labels[:sign_in] path = create_session_path [:role] link_to(label, path) end |
#sign_out_link(options = {}) ⇒ Object Also known as: log_out_link
4 5 6 7 8 |
# File 'lib/auth_assistant/view/session_link.rb', line 4 def sign_out_link( = {}) label = [:label] || auth_labels[:sign_out] path = destroy_session_path [:role] link_to(label, path) end |