move macros from basecontroller to route filter