This commit is contained in:
albert
2010-08-18 18:42:33 -04:00
parent 23656e3fa9
commit 5610731b35
48 changed files with 664 additions and 716 deletions

View File

@@ -1,7 +1,15 @@
class FavoritesController < ApplicationController
def create
@favorite = Favorite.create(
:user_id => @current_user.id,
:post_id => params[:favorite][:post_id]
)
end
def destroy
Favorite.destroy(
:user_id => @current_user.id,
:post_id => params[:favorite][:post_id]
)
end
end