Merge branch 'szzh' of http://repository.trustie.net/xianbo/trustie2 into szzh
This commit is contained in:
commit
a64671f9de
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue