Module: Balrog::ViewHelpers
- Defined in:
- lib/balrog/view_helpers.rb
Overview
ViewHelpers methods are made available in all views by the code in engine.rb.
Instance Method Summary collapse
- #balrog_logout_button(options = nil, html_options = nil) ⇒ Object
- #balrog_omniauth_configured? ⇒ Boolean
- #show_balrog_password_prompt? ⇒ Boolean
Instance Method Details
#balrog_logout_button(options = nil, html_options = nil) ⇒ Object
3 4 5 6 7 8 9 10 11 12 13 14 15 |
# File 'lib/balrog/view_helpers.rb', line 3 def ( = nil, = nil) name = 'Logout' ||= {} [:method] = 'delete' if .is_a?(String) name = elsif .is_a?(Hash) = .merge() end (name, '/balrog/logout', ) end |
#balrog_omniauth_configured? ⇒ Boolean
21 22 23 |
# File 'lib/balrog/view_helpers.rb', line 21 def balrog_omniauth_configured? !!Balrog::Middleware.omniauth_config end |
#show_balrog_password_prompt? ⇒ Boolean
17 18 19 |
# File 'lib/balrog/view_helpers.rb', line 17 def show_balrog_password_prompt? !!Balrog::Middleware.password_hash || !Balrog::Middleware.omniauth_config end |