Class: ApplicationController

Inherits:
ActionController::Base
  • Object
show all
Defined in:
app/controllers/application_controller.rb

Instance Method Summary collapse

Instance Method Details

#display_uservoice_ssoObject



46
47
48
49
50
51
52
53
# File 'app/controllers/application_controller.rb', line 46

def display_uservoice_sso
  if current_user && ::Configuration[:uservoice_subdomain] && ::Configuration[:uservoice_sso_key]
    Uservoice::Token.generate({
      guid: current_user.id, email: current_user.email, display_name: current_user.display_name,
      url: user_url(current_user), avatar_url: current_user.display_image
    })
  end
end

#render_facebook_like(options = {}) ⇒ Object



42
43
44
# File 'app/controllers/application_controller.rb', line 42

def render_facebook_like options={}
  render_to_string(partial: 'layouts/facebook_like', locals: options).html_safe
end

#render_facebook_sdkObject

We use this method only to make stubing easier and remove FB templates from acceptance tests



34
35
36
# File 'app/controllers/application_controller.rb', line 34

def render_facebook_sdk
  render_to_string(partial: 'layouts/facebook_sdk').html_safe
end

#render_twitter(options = {}) ⇒ Object



38
39
40
# File 'app/controllers/application_controller.rb', line 38

def render_twitter options={}
  render_to_string(partial: 'layouts/twitter', locals: options).html_safe
end