Showing posts with label controllers. Show all posts
Showing posts with label controllers. Show all posts

Wednesday, March 12, 2014

Caching user records when using Authlogic

Today, I ran across another form of this issue with Authlogic. In short, every request in a Rails application using Authlogic with a User model that includes a last_request_at column will cause the updated_at column to change. This can break caching that is based on the last time a user was updated.

Wednesday, September 15, 2010

Testing ASP.NET MVC Filters

Testing controllers in ASP.NET MVC is straight forward.  However, testing action filters applied to controllers or actions requires jumping through a few hoops.  Since filters are applied by the framework, calling the action directly means no filters are executed.  Thus, you write two tests: one for the filter and one that the controller is decorated with the filter.