Module: ApplicationHelper

Defined in:
lib/generators/marilyn/fish/app/helpers/application_helper.rb

Instance Method Summary collapse

Instance Method Details

#hidden_div_if(condition, attributes = {}, &block) ⇒ Object



7
8
9
10
# File 'lib/generators/marilyn/fish/app/helpers/application_helper.rb', line 7

def hidden_div_if(condition, attributes = {}, &block)
  attributes[:style] = 'display: none' if condition
  ('div', attributes, &block)
end

#title(title_text) ⇒ Object



2
3
4
5
# File 'lib/generators/marilyn/fish/app/helpers/application_helper.rb', line 2

def title(title_text)
  content_for(:title) { title_text }
  ('h1', title_text)
end