Filters - add solution to write before-filter and after-filter hooks in ruby