Module: VkontakteAuthentication::Helper
- Defined in:
- lib/vkontakte/helper.rb
Instance Method Summary collapse
- #init_vkontakte ⇒ Object
- #vkontakte_login_link_to(name, url = user_session_path, html_options = {}) ⇒ Object
Instance Method Details
#init_vkontakte ⇒ Object
3 4 5 |
# File 'lib/vkontakte/helper.rb', line 3 def init_vkontakte vkontakte_div + vkontakte_init if vk_app_id end |
#vkontakte_login_link_to(name, url = user_session_path, html_options = {}) ⇒ Object
7 8 9 10 11 12 |
# File 'lib/vkontakte/helper.rb', line 7 def vkontakte_login_link_to(name, url = user_session_path, = {}) authenticity_token = protect_against_forgery? ? form_authenticity_token : '' = "{ url: '#{url}', authenticity_token: '#{authenticity_token}', session_key: '#{request.[:key]}', session_id: '#{request.[:id]}' }" .merge!(:onclick => "vkLogin(#{});") if vk_app_id link_to name, "#", end |