Ruby on Rails Explained
before_action
Jul 20, 2018 - Daniel Viklund
When writing controllers in Ruby on rails, using before_action
(used to be called before_filter
in earlier versions) is your bread-and-butter for structuring your business logic in a useful way. It’s what you want to use to “prepare” the data necessary before the action executes.