kbaum/browser-timezone-rails — pull request #3 by panozzaj (2013-12-02 20:09:52+00:00)
Title: Use time zone wrapper on all controllers

This PR uses the time zone wrapper on all controllers, not just controllers that extend ApplicationController.

Used a modification of the proposed code for #2 since I ran into the same issue on my project when trying to use this gem. Thanks for the detailed writeup and sample code, @mhuggins.

I am not super familiar with Rails Engines / middleware, so any improvements or suggestions are welcome. The tests did not need to be modified and still pass for me after changing (I confirmed they broke when I modified just the controller to be ActionController::Base.) It also appears to work correctly in my project.

I used http://stackoverflow.com/questions/3468858/rails-3-0-engine-execute-code-in-actioncontroller for reference.