Module: Forcast::Application::Locale

Extended by:
ActiveSupport::Concern
Defined in:
lib/forcast/controllers/application/locale.rb

Instance Method Summary collapse

Instance Method Details

#aObject



24
25
26
# File 'lib/forcast/controllers/application/locale.rb', line 24

def a
	return action_name
end

#cObject



20
21
22
# File 'lib/forcast/controllers/application/locale.rb', line 20

def c
	return controller_name
end

#set_localeObject



11
12
13
# File 'lib/forcast/controllers/application/locale.rb', line 11

def set_locale
   I18n.locale = I18n.default_locale
end

#t(s, custom = '') ⇒ Object



15
16
17
18
# File 'lib/forcast/controllers/application/locale.rb', line 15

def t (s,custom='')
	str = c + '.' + a + '.'+s
	return I18n.t(str,custom)
end