Class: ApplicationController
- Inherits:
-
ActionController::Base
- Object
- ActionController::Base
- ApplicationController
show all
- Defined in:
- app/controllers/application_controller.rb
Direct Known Subclasses
Adm::BaseController, Channels::BaseController, ExploreController, Projects::BackersController, Projects::UpdatesController, ProjectsController, Reports::BaseController, RewardsController, StaticController, UnsubscribesController, Users::BackersController, Users::ProjectsController, UsersController
Instance Method Summary
collapse
Instance Method Details
#display_uservoice_sso ⇒ Object
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_sdk ⇒ Object
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
|
38
39
40
|
# File 'app/controllers/application_controller.rb', line 38
def options={}
render_to_string(partial: 'layouts/twitter', locals: options).html_safe
end
|