Module: BrowserId::ViewHelpers

Defined in:
lib/devise-browserid/view_helpers.rb

Instance Method Summary collapse

Instance Method Details

#browserid_include_js_urlObject

The URL to the BrowserID official JavaScript



17
18
19
# File 'lib/devise-browserid/view_helpers.rb', line 17

def browserid_include_js_url
  "https://#{ Warden::BrowserId::Strategy.browserid_url }/include." + (::Rails.env == "development" ? "orig.js" : ".js")
end

#browserid_include_tagObject

BrowserID JavaScript tags:

  • The official BrowserID include.js

  • The Devise enabled login and assertion reponse



7
8
9
# File 'lib/devise-browserid/view_helpers.rb', line 7

def browserid_include_tag
  javascript_include_tag(browserid_include_js_url, "browserid")
end

#browserid_login_tag(path) ⇒ Object

The BrowserID login button



12
13
14
# File 'lib/devise-browserid/view_helpers.rb', line 12

def (path)
  image_tag("sign_in_blue.png", :onclick => "browserIdLogin('#{path}');")
end