myexperiment-hackers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[myexperiment-hackers] [2527] trunk/app/controllers/packs_controller.rb:


From: noreply
Subject: [myexperiment-hackers] [2527] trunk/app/controllers/packs_controller.rb: fixed bug when adding a pack to favourites
Date: Fri, 8 Oct 2010 10:17:27 -0400 (EDT)

Revision
2527
Author
dgc
Date
2010-10-08 10:17:26 -0400 (Fri, 08 Oct 2010)

Log Message

fixed bug when adding a pack to favourites

Modified Paths

Diff

Modified: trunk/app/controllers/packs_controller.rb (2526 => 2527)


--- trunk/app/controllers/packs_controller.rb	2010-09-30 15:05:16 UTC (rev 2526)
+++ trunk/app/controllers/packs_controller.rb	2010-10-08 14:17:26 UTC (rev 2527)
@@ -168,7 +168,7 @@
   
   # POST /packs/1;favourite
   def favourite
-    @pack.bookmarks << Bookmark.create(:user => current_user) unless @pack.bookmarked_by_user?(current_user)
+    @pack.bookmarks << Bookmark.create(:user => current_user, :bookmarkable => @pack) unless @pack.bookmarked_by_user?(current_user)
     
     respond_to do |format|
       flash[:notice] = "You have successfully added this item to your favourites."

reply via email to

[Prev in Thread] Current Thread [Next in Thread]