Remove unused code [Refs #207]

This commit is contained in:
Vladimir Sharshov 2012-02-24 17:50:35 +04:00
parent 63c89edfda
commit 3685eafe57
2 changed files with 0 additions and 16 deletions

View File

@ -8,7 +8,6 @@ class Comment < ActiveRecord::Base
# FIXME # FIXME
after_create :subscribe_on_reply, :unless => "commentable_type == 'Grit::Commit'" after_create :subscribe_on_reply, :unless => "commentable_type == 'Grit::Commit'"
#after_create :deliver_new_comment_notification, :unless => "commentable_type == 'Grit::Commit'"
after_create :invoke_helper, :if => "commentable_type == 'Grit::Commit'" after_create :invoke_helper, :if => "commentable_type == 'Grit::Commit'"
after_create :subscribe_users after_create :subscribe_users
after_create {|comment| Subscribe.new_comment_notification(comment)} after_create {|comment| Subscribe.new_comment_notification(comment)}
@ -35,20 +34,6 @@ class Comment < ActiveRecord::Base
protected protected
#def deliver_new_comment_notification
# subscribes = self.commentable.subscribes
# subscribes.each do |subscribe|
# # TODO: new_comment and new_comment_reply - you need to check each variant, not only new_comment_reply...
# if self.user_id != subscribe.user_id && User.find(subscribe.user).notifier.new_comment_reply && User.find(subscribe.user).notifier.can_notify
# if self.reply? subscribe
# UserMailer.delay.new_comment_reply_notification(self, subscribe.user)
# else
# UserMailer.delay.new_comment_notification(self, subscribe.user)
# end
# end
# end
#end
def subscribe_on_reply def subscribe_on_reply
self.commentable.subscribes.create(:user_id => self.user_id) if !self.commentable.subscribes.exists?(:user_id => self.user_id) self.commentable.subscribes.create(:user_id => self.user_id) if !self.commentable.subscribes.exists?(:user_id => self.user_id)
end end

View File

@ -211,7 +211,6 @@ Rosa::Application.routes.draw do
match '/projects/:project_id/git/raw/:treeish/*path', :controller => "git/blobs", :action => :raw, :treeish => /[0-9a-zA-Z_.\-]*/, :defaults => { :treeish => :master }, :as => :raw match '/projects/:project_id/git/raw/:treeish/*path', :controller => "git/blobs", :action => :raw, :treeish => /[0-9a-zA-Z_.\-]*/, :defaults => { :treeish => :master }, :as => :raw
match '/projects/:project_id/git/commit/raw/:commit_hash/*path', :controller => "git/blobs", :action => :raw, :as => :raw_commit match '/projects/:project_id/git/commit/raw/:commit_hash/*path', :controller => "git/blobs", :action => :raw, :as => :raw_commit
#root :to => "platforms#index"
root :to => "activity_feeds#index" root :to => "activity_feeds#index"
match '/forbidden', :to => 'platforms#forbidden', :as => 'forbidden' match '/forbidden', :to => 'platforms#forbidden', :as => 'forbidden'
end end