Module: Bookends::ApplicationHelper
- Defined in:
- app/helpers/bookends/application_helper.rb
Defined Under Namespace
Classes: GlostickUserExtractor
Instance Method Summary
collapse
Instance Method Details
#glostick_user_email ⇒ Object
27
28
29
|
# File 'app/helpers/bookends/application_helper.rb', line 27
def glostick_user_email
glostick_user['email']
end
|
#glostick_user_name ⇒ Object
23
24
25
|
# File 'app/helpers/bookends/application_helper.rb', line 23
def glostick_user_name
glostick_user['full_name']
end
|
11
12
13
|
# File 'app/helpers/bookends/application_helper.rb', line 11
def google_search_form
"<gcse:searchbox-only resultsUrl='/search'></gcse:searchbox-only>".html_safe
end
|
#google_search_results ⇒ Object
15
16
17
|
# File 'app/helpers/bookends/application_helper.rb', line 15
def google_search_results
"<gcse:searchresults-only linkTarget='_parent'></gcse:searchresults-only>".html_safe
end
|
#hero_class ⇒ Object
46
47
48
|
# File 'app/helpers/bookends/application_helper.rb', line 46
def hero_class
end
|
#logged_in? ⇒ Boolean
19
20
21
|
# File 'app/helpers/bookends/application_helper.rb', line 19
def logged_in?
!!cookies[:heroku_session]
end
|
#relative_search_path ⇒ Object
3
4
5
|
# File 'app/helpers/bookends/application_helper.rb', line 3
def relative_search_path
'/search'
end
|
#search_disabled? ⇒ Boolean
7
8
9
|
# File 'app/helpers/bookends/application_helper.rb', line 7
def search_disabled?
false
end
|
#signup_link(title, options = {}) ⇒ Object
31
32
33
34
35
36
37
38
39
40
41
42
43
44
|
# File 'app/helpers/bookends/application_helper.rb', line 31
def signup_link(title, options = {})
url = "https://signup.heroku.com"
data = { trackable: { category: "Sign Up Links", action: "Clicked", label: "#{options[:referral] || options[:branded_signup]}" } }
url += "/#{options[:branded_signup]}" if options[:branded_signup]
if options[:campaign_id]
url = url + "?c=" + options[:campaign_id]
elsif options[:referral]
url = url + "/" + options[:referral]
end
link_to title, url, class: options[:class], data: data
end
|