changed before_action to before_filter because rails 3