module Hello::RailsHelper

Public Instance Methods

available_locales_with_names() click to toggle source
# File lib/hello/rails_helper.rb, line 30
def available_locales_with_names
  Hello::Locales.all.select { |k, _v| Hello.configuration.locales.include? k }
end
current_locale() click to toggle source
# File lib/hello/rails_helper.rb, line 26
def current_locale
  session['locale']
end
hello_locale_select_options() click to toggle source
['English', 'en']
# File lib/hello/rails_helper.rb, line 18
def hello_locale_select_options
  available_locales_with_names.map { |k, v| [v, k] }
end
human_current_locale() click to toggle source
# File lib/hello/rails_helper.rb, line 22
def human_current_locale
  t('hello.locale_name')
end
method_missing(method, *args, &block) click to toggle source
Calls superclass method
# File lib/hello/rails_helper.rb, line 3
def method_missing(method, *args, &block)
  # # http://candland.net/2012/04/17/rails-routes-used-in-an-isolated-engine/
  # puts "LOOKING FOR ROUTES #{method}"
  return super unless method.to_s.end_with?('_path', '_url')
  return super unless main_app.respond_to?(method)
  main_app.send(method, *args)
end
respond_to?(method) click to toggle source
Calls superclass method
# File lib/hello/rails_helper.rb, line 11
def respond_to?(method)
  return super unless method.to_s.end_with?('_path', '_url')
  return super unless main_app.respond_to?(method)
  true
end