fixed tests
This commit is contained in:
@@ -1,14 +1,18 @@
|
||||
class FavoritesController < ApplicationController
|
||||
def index
|
||||
@posts = CurrentUser.favorite_posts(params)
|
||||
end
|
||||
|
||||
def create
|
||||
@favorite = Favorite.create(
|
||||
:user_id => CurrentUser.user.id,
|
||||
:user_id => CurrentUser.id,
|
||||
:post_id => params[:favorite][:post_id]
|
||||
)
|
||||
end
|
||||
|
||||
def destroy
|
||||
Favorite.destroy(
|
||||
:user_id => CurrentUser.user.id,
|
||||
:user_id => CurrentUser.id,
|
||||
:post_id => params[:favorite][:post_id]
|
||||
)
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user