use before_action only for Rails >= 5
use before_action only for Rails >= 5

conditional branch on `Rails::VERSION::MAJOR` for backwards compatibility
charlotte-ruby/impressionist,charlotte-ruby/impressionist,charlotte-ruby/impressionist