Module: ApplicationHelper

Defined in:
app/helpers/application_helper.rb

Overview

Methods added to this helper will be available to all templates in the application.

Instance Method Summary collapse

Instance Method Details

#flag_image(code) ⇒ Object



17
18
19
# File 'app/helpers/application_helper.rb', line 17

def flag_image(code)
  "#{code.to_s.split("-").last.downcase}.png"
end

#render_extra_partials(f) ⇒ Object

Renders all the extension partials that may have been specified in the extensions



11
12
13
14
15
# File 'app/helpers/application_helper.rb', line 11

def render_extra_partials(f)
  @extension_partials.inject("") do |extras, partial|
    extras += render :partial => partial, :locals => {:f => f}
  end
end

#store_menu?Boolean

helper to determine if its appropriate to show the store menu

Returns:

  • (Boolean)


5
6
7
8
# File 'app/helpers/application_helper.rb', line 5

def store_menu?
  return true unless %w{thank_you}.include? @current_action
  false
end