diff --git a/app/models/blog_comment.rb b/app/models/blog_comment.rb index 255410a89..05ae02fe2 100644 --- a/app/models/blog_comment.rb +++ b/app/models/blog_comment.rb @@ -21,7 +21,7 @@ class BlogComment < ActiveRecord::Base after_save :add_user_activity after_update :update_activity - after_create :update_parent_time, :blog_wechat_message + after_create :update_parent_time before_destroy :destroy_user_activity scope :like, lambda {|arg| diff --git a/app/models/homework_common.rb b/app/models/homework_common.rb index 325b599e3..a915b1545 100644 --- a/app/models/homework_common.rb +++ b/app/models/homework_common.rb @@ -30,7 +30,7 @@ class HomeworkCommon < ActiveRecord::Base :author => :author, :url => Proc.new {|o| {:controller => 'student_work', :action => 'index', :homework => o.id}} after_create :act_as_activity, :send_mail,:act_as_course_message - after_update :update_activity, :wechat_message + after_update :update_activity after_save :act_as_course_activity after_destroy :delete_kindeditor_assets diff --git a/app/models/journal.rb b/app/models/journal.rb index 6d59c7414..bea273a41 100644 --- a/app/models/journal.rb +++ b/app/models/journal.rb @@ -55,7 +55,6 @@ class Journal < ActiveRecord::Base # fq after_save :act_as_activity,:be_user_score, :act_as_forge_message, act_as_at_message(:notes, :user_id) - after_create :issue_wechat_message # end #after_destroy :down_user_score #before_save :be_user_score diff --git a/public/javascripts/wechat/app.js b/public/javascripts/wechat/app.js index ee849aad8..641e95bed 100644 --- a/public/javascripts/wechat/app.js +++ b/public/javascripts/wechat/app.js @@ -111,9 +111,6 @@ app.controller('ActivityController',function($anchorScroll, $location,$scope, $h url: apiUrl+ "activities", data: {openid: auth.openid(), page: page} }).then(function successCallback(response) { - if(response.data.message == "undefined method `user' for nil:NilClass"){ - alert("请先绑定确实的用户账号"); - } $scope.current_page = 0; console.log($scope.current_page); console.log(response.data.page);