Change the statement 'before_filter' to 'before_action'

Follow the Rails change https://github.com/rails/rails/commit/9d62e04838f01f5589fa50b0baa480d60c815e2c