/rails_fix_google_bot_accept

Rails fix for Google bot requests

Primary LanguageRubyMIT LicenseMIT

RailsFixGoogleBotAccept

This gem fixes the ActionView::MissingTemplate error generated by Rails when a page is requested with the header Accept: */*;q=0.9 (or any other number).

The Google bot does such requests.

Installation

Add this line to your application's Gemfile:

gem 'rails_fix_google_bot_accept'

And then execute:

$ bundle

That's it.

Source

The gem is based on this gist: https://gist.github.com/2590040/93cb2faca1ba5ead73222e74ca11790e3efb22de

It was made by Romain Champourlier as an answer to this question: http://stackoverflow.com/questions/8881756/googlebot-receiving-missing-template-error-for-an-existing-template

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request