Module: Multiauth::ViewsHelper
- Defined in:
- lib/multiauth/views_helper.rb
Instance Method Summary collapse
- #multiauth_assets ⇒ Object
- #multiauth_box(title = nil) ⇒ Object
- #multiauth_link(provider, text = "", cssclass = nil) ⇒ Object
- #multiauth_menu(title = "Sign In") ⇒ Object
- #multiauth_providers ⇒ Object
Instance Method Details
#multiauth_assets ⇒ Object
11 12 13 14 |
# File 'lib/multiauth/views_helper.rb', line 11 def multiauth_assets javascript_include_tag('multiauth')+ stylesheet_link_tag('multiauth') end |
#multiauth_box(title = nil) ⇒ Object
3 4 5 |
# File 'lib/multiauth/views_helper.rb', line 3 def multiauth_box(title = nil) render "multiauth/box", :title => title end |
#multiauth_link(provider, text = "", cssclass = nil) ⇒ Object
20 21 22 23 24 25 |
# File 'lib/multiauth/views_helper.rb', line 20 def multiauth_link(provider, text = "", cssclass = nil) config = multiauth_providers[provider] css_class ||= "#{provider} openid_btn #{config["class"]}" %@<a class="#{css_class}" title="#{provider}" href="/auth/#{config["openid"] ? "open_id?openid_url=#{config["openid"]}" : "#{provider.underscore}"}">#{text}</a>@ end |
#multiauth_menu(title = "Sign In") ⇒ Object
7 8 9 |
# File 'lib/multiauth/views_helper.rb', line 7 def (title = "Sign In") render "multiauth/menu", :title => title end |