i have two actions in my controller
def up_vote
lesson = Lesson.find(params[:id])
current_user.up_vote!(lesson)
flash[:message] = 'Thanks for voting!'
redirect_to lesson_path(lesson)
end
def down_vote
lesson = Lesson.find(params[:id])
current_user.down_vote!(lesson)
flash[:message] = 'Thanks for voting!'
redirect_to lesson_path(lesson)
end
i was wondering what would be a good way to refactor this (keeping DRY in mind)? i read online that i shouldn't be trying to abuse the before_filter. what else could i use then? thanks!