Module: Mobility::Plugins::ActiveRecord::ColumnFallback
- Extended by:
- Mobility::Plugin
- Defined in:
- lib/mobility/plugins/active_record/column_fallback.rb
Defined Under Namespace
Modules: BackendClassMethods, BackendInstanceMethods
Class Method Summary collapse
Methods included from Mobility::Plugin
configure, configure_default, default, dependencies, dependencies_satisfied?, included, included_hook, initialize_hook, requires
Class Method Details
.use_column_fallback?(options, locale) ⇒ Boolean
21 22 23 24 25 26 27 28 29 30 31 32 |
# File 'lib/mobility/plugins/active_record/column_fallback.rb', line 21 def self.use_column_fallback?(, locale) case column_fallback = [:column_fallback] when TrueClass locale == I18n.default_locale when Array column_fallback.include?(locale) when Proc column_fallback.call(locale) else false end end |