Created
June 14, 2013 04:20
-
-
Save r38y/5779440 to your computer and use it in GitHub Desktop.
It handles the case where there is a funky format and a template for it can't be found.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module HandleFunkyFormats | |
extend ActiveSupport::Concern | |
included do | |
rescue_from ActionView::MissingTemplate do | |
if params[:format] | |
redirect_to format: nil | |
end | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment