Created
June 23, 2011 20:41
-
-
Save johndavid400/1043577 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
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