Skip to content

Instantly share code, notes, and snippets.

@havenwood
Created August 4, 2020 16:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save havenwood/bb9c16883721113df57c07bd09265b8e to your computer and use it in GitHub Desktop.
Save havenwood/bb9c16883721113df57c07bd09265b8e to your computer and use it in GitHub Desktop.
class UsersController < ApplicationController
NON_USER_ACTIONS = %i[
index
something_else
something_else2
something_else3
something_else4
something_else5
].freeze
private_constant :NON_USER_ACTIONS
before_action :set_user, except: NON_USER_ACTIONS
# snip
end
@baweaver
Copy link

baweaver commented Aug 4, 2020

before_action :set_user, except: %i[
  index
  something_else
  something_else2
  something_else3
  something_else4
  something_else5
]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment