Created
December 2, 2009 21:12
-
-
Save freemarmoset/247590 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def set_cart_to_current_customers() | |
@cart = current_customer.carts.find_by_cart_reference(params[:id]) | |
return cart_access_denied unless @cart | |
end | |
def cart_access_denied | |
flash[:error] = "You are in an inconsistent customer state. As customer ##{current_customer.account_detail.customer_number} you are attemping to alter cart ##{params[:id]}" | |
redirect_to kehe_direct_home_path | |
false | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment