fixes #3303
This commit is contained in:
@@ -63,7 +63,7 @@ class FavoriteGroupsController < ApplicationController
|
||||
@favorite_group = FavoriteGroup.find(params[:id])
|
||||
check_privilege(@favorite_group)
|
||||
@post = Post.find(params[:post_id])
|
||||
@favorite_group.add!(@post)
|
||||
@favorite_group.add!(@post.id)
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
@@ -176,6 +176,7 @@ class FavoriteGroup < ApplicationRecord
|
||||
return if contains?(post_id)
|
||||
|
||||
clear_post_id_array
|
||||
puts ">>> post_id=#{post_id} post_ids=#{post_ids.inspect}"
|
||||
update_attributes(:post_ids => add_number_to_string(post_id, post_ids))
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user