Module: Localite::Filter::ControllerMethods
- Defined in:
- lib/localite/filter.rb
Instance Method Summary collapse
-
#current_locale ⇒ Object
override this method to adjust localite parameters.
-
#localite_format ⇒ Object
return the current scope(s) as an array.
-
#localite_scopes ⇒ Object
return the current scope(s) as an array.
Instance Method Details
#current_locale ⇒ Object
override this method to adjust localite parameters
27 28 29 30 |
# File 'lib/localite/filter.rb', line 27 def current_locale return params[:locale] if params[:locale] && params[:locale] =~ /^[a-z][a-z]$/ return params[:lang] if params[:lang] && params[:lang] =~ /^[a-z][a-z]$/ end |
#localite_format ⇒ Object
return the current scope(s) as an array.
40 41 42 |
# File 'lib/localite/filter.rb', line 40 def localite_format :html end |
#localite_scopes ⇒ Object
return the current scope(s) as an array.
34 35 36 |
# File 'lib/localite/filter.rb', line 34 def localite_scopes [] end |