Created
May 24, 2010 07:23
-
-
Save ravionrails/411617 to your computer and use it in GitHub Desktop.
This file contains 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 new_cart_item | |
@customer = Customer.new | |
end | |
def create_new_cart_item | |
@customer = Customer.new(params[:customer]) | |
if @customer.save | |
flash[:notice] = "Successfully created" | |
redirect_to show_next_item_url(:id => @product) | |
else | |
flash[:notice] = "Some error occur" | |
redirect_to new_cart_item_url | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment