before_filter for link