Sha256: 6301b0b418e1bce92b54e070d9058b51fc8f762f1aab135bd32d43ec76d32e0b

Contents?: true

Size: 768 Bytes

Versions: 1

Compression:

Stored size: 768 Bytes

Contents

module Multiauth
  module ViewsHelper
    def multiauth_box(title = nil)
      render "multiauth/box", :title => title
    end

    def multiauth_menu(title = "Sign In")
      render "multiauth/menu", :title => title
    end

    def multiauth_assets
      javascript_include_tag('multiauth')+
      stylesheet_link_tag('multiauth')
    end

    def multiauth_providers
      Multiauth.providers || {}
    end

    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
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
multiauth-0.2.7 lib/multiauth/views_helper.rb