Module: Tramway::Landing::ApplicationHelper

Includes:
Admin::RussianCasesHelper, Profiles::LinksHelper
Defined in:
app/helpers/tramway/landing/application_helper.rb

Instance Method Summary collapse

Instance Method Details

#actual_forms(forms) ⇒ Object



9
10
11
12
13
# File 'app/helpers/tramway/landing/application_helper.rb', line 9

def actual_forms(forms)
  forms = forms.reject { |f| f.form_name == 'user_sign_up' } if @signed_in
  forms = forms.reject { |f| f.form_name == 'user_sign_in' } if @signed_in
  forms
end

#block_tagline(block) ⇒ Object



27
28
29
30
31
32
33
34
35
36
37
# File 'app/helpers/tramway/landing/application_helper.rb', line 27

def block_tagline(block)
  unless block.is_a? Array
    if block.page.page_type.main?
      content_for?(:application_tagline) && content_for(:application_tagline).present? ? content_for(:application_tagline) : @application.tagline
    else
      block.each do |_current_block|
        raw block.page.body
      end
    end
  end
end

#block_title(block) ⇒ Object



15
16
17
18
19
20
21
22
23
24
25
# File 'app/helpers/tramway/landing/application_helper.rb', line 15

def block_title(block)
  if block.is_a? Array
    block.each do |current_block|
      current_block.page.title
    end
  else
    if block.page.page_type.main?
      content_for?(:application_name) && content_for(:application_name).present? ? content_for(:application_name) : @application.public_name
    end
  end
end