lib/mobylette/respond_to_mobile_requests.rb
def configure_fallback_resolver(options)
        if options[:fall_back]
          logger.warn "DEPRECATED > Mobylette: Please don't user :fall_back to configure fall backs any more. See the README for :fallback_chains instead."
          self.mobylette_resolver.replace_fallback_formats_chain({ mobile: [:mobile, options[:fall_back]] })
        else
          if options[:fallback_chains]
            self.mobylette_resolver.replace_fallback_formats_chain((options[:fallback_chains] || {}).reverse_merge({ mobile: [:mobile, :html] }))
          end
        end
      end
# Private: Configures how the resolver shall handle fallbacks.
#
# if options has a :fallback_chains key, it will use it 
# as the fallback rules for the resolver, the format should
# be a hash, where each key defines a array of formats.
# Example:
#   options[:fallback_chains]
#   #=> { iphone: [:iphone, :mobile, :html], mobile: [:mobile, :html] }
#
# if there is no :fallback_chains, then it will look for a :fall_back
# key, that shall define only 1 fallback format to the mobile format.
# This keep compatibility with older versions.
# Example:
#   options[:fall_back]
#   #=> :html
#
Configures how the resolver shall handle fallbacks.
if options has a :fallback_chains key, it will use it
as the fallback rules for the resolver, the format should
be a hash, where each key defines a array of formats.

if there is no :fallback_chains, then it will look for a :fall_back
key, that shall define only 1 fallback format to the mobile format.
This keep compatibility with older versions.
Example:
options[:fall_back]
> :html
Configures how the resolver shall handle fallbacks . if options has a : fallback_chains key it will use it as the fallback rules for the resolver the format should be a hash where each key defines a array of formats . if there is no : fallback_chains then it will look for a : fall_back key that shall define only 1 fallback format to the mobile format . This keep compatibility with older versions . Example : options [ : fall_back ] > : html
def configure_fallback_resolver(options)
        if options[:fall_back]
          logger.warn "DEPRECATED > Mobylette: Please don't user :fall_back to configure fall backs any more. See the README for :fallback_chains instead."
          self.mobylette_resolver.replace_fallback_formats_chain({ mobile: [:mobile, options[:fall_back]] })
        else
          if options[:fallback_chains]
            self.mobylette_resolver.replace_fallback_formats_chain((options[:fallback_chains] || {}).reverse_merge({ mobile: [:mobile, :html] }))
          end
        end
      end
def configure_fallback_resolver ( options ) if options [ :fall_back ] logger . warn "DEPRECATED > Mobylette: Please don't user :fall_back to configure fall backs any more. See the README for :fallback_chains instead." self . mobylette_resolver . replace_fallback_formats_chain ( { mobile : [ :mobile , options [ :fall_back ] ] } ) else if options [ :fallback_chains ] self . mobylette_resolver . replace_fallback_formats_chain ( ( options [ :fallback_chains ] || { } ) . reverse_merge ( { mobile : [ :mobile , :html ] } ) ) end end end
Private: Configures how the resolver shall handle fallbacks.
Private : Configures how the resolver shall handle fallbacks .
options