Skip to content

Instantly share code, notes, and snippets.

@johndavid400
Created June 23, 2011 20:41
Show Gist options
  • Save johndavid400/1043577 to your computer and use it in GitHub Desktop.
Save johndavid400/1043577 to your computer and use it in GitHub Desktop.
78 def watch
79 @stock = Stock.find(params[:id])
80 UserStock.create(:user_id => current_user.id, :stock_id => @stock.id)
81 flash[:notice] = "Stock was added to your watch list"
82 redirect_to stocks_path
83 end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment