Move common code into private method, use before_filter
Merge pull request #311 from sferik/find_tag_and_category

Move common code into private method, use before_filter