Module: Localite::Filter::ControllerMethods

Defined in:
lib/localite/filter.rb

Instance Method Summary collapse

Instance Method Details

#current_localeObject

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_formatObject

return the current scope(s) as an array.



40
41
42
# File 'lib/localite/filter.rb', line 40

def localite_format
  :html
end

#localite_scopesObject

return the current scope(s) as an array.



34
35
36
# File 'lib/localite/filter.rb', line 34

def localite_scopes
  []
end