Flowdock

Notes posted by jmcnevin

RSS feed
July 15, 2009
0 thanks

Time.now in views.

Be careful if you use Time.now in views with time zone support enabled, as this will not actually do the time zone conversion.

Instead, use Time.zone.now.

June 1, 2009
2 thanks

Make sure your action names don't step on any toes.

In my experience, if you ever have a controller action named “process”, your controller will cease to function, as there is both a class and instance method called process in ActionController::Base.

There are undoubtedly other action names that will cause conflicts, but this one is particular I’ve run into a number of times.