Skip to content

Instantly share code, notes, and snippets.

@dpritchett
Created February 12, 2014 16:35
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 dpritchett/8959214 to your computer and use it in GitHub Desktop.
Save dpritchett/8959214 to your computer and use it in GitHub Desktop.
# Form buttons allow user to pick a named scope for their order list
def render_with_user_scope(*args)
add_user_scope_to_result_set! if (action == :index)
render_without_user_scope(*args)
end
alias_method_chain :render, :user_scope
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment