Replaced before_filter with before_action

As per Rails 4 guidelines before_filter should be replaced with before_action. So, I replaced 'before_filter' with 'before_action'.

Source: https://github.com/rails/rails/commit/9d62e04838f01f5589fa50b0baa480d60c815e2c