benlangfeld/mobile-fu — pull request #53 by bunnymatic (2014-09-28 03:25:30+00:00)
Title: fall back to html if the format is something we cant handle

We've been seeing the following error with bad formats (like .php)

…undle/ruby/2.1.0/gems/mobile-fu-1.3.1/lib/mobile-fu.rb: 129:in `set_mobile_format'
…undle/ruby/2.1.0/gems/mobile-fu-1.3.1/lib/mobile-fu.rb: 104:in `set_request_format'
…s/activesupport-3.2.19/lib/active_support/callbacks.rb: 451:in `_run__3927665085735429995__process_action__462404612733862062__callbacks'
...

The root of the issue is that bad formats (I assume ones that mobile-fu is not looking for) don't respond to `html?`. This fix falls back to html as the format if doesn't know how to ask `html?`.

I was unable to run the specs because `mocha/setup` was not available and I was not ready to debug the test suite. I'm happy to add tests, if you can help get the framework working.