Replaced before_filter with before_action in topics_controller.rb