This commit is contained in:
sw 2015-03-05 09:27:26 +08:00
commit a64671f9de
1 changed files with 5 additions and 0 deletions

View File

@ -1,7 +1,12 @@
#coding=utf-8
class WatchesService
def watch params
@current_user = User.find(params[:current_user_id])
if params[:object_type] == 'user' && params[:current_user_id] == params[:object_id]
raise '不能关注自己!'
end
@watchables = find_watchables params
if @watchables.nil?
raise '404'
end