Module: Multiauth::ViewsHelper

Defined in:
lib/multiauth/views_helper.rb

Instance Method Summary collapse

Instance Method Details

#multiauth_assetsObject



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


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 multiauth_menu(title = "Sign In")
  render "multiauth/menu", :title => title
end

#multiauth_providersObject



16
17
18
# File 'lib/multiauth/views_helper.rb', line 16

def multiauth_providers
  Multiauth.providers || {}
end