From 3685eafe575e2f0d5752c422cb4323b2925e1a75 Mon Sep 17 00:00:00 2001 From: Vladimir Sharshov Date: Fri, 24 Feb 2012 17:50:35 +0400 Subject: [PATCH] Remove unused code [Refs #207] --- app/models/comment.rb | 15 --------------- config/routes.rb | 1 - 2 files changed, 16 deletions(-) diff --git a/app/models/comment.rb b/app/models/comment.rb index bd84e8f68..e6a72f83e 100644 --- a/app/models/comment.rb +++ b/app/models/comment.rb @@ -8,7 +8,6 @@ class Comment < ActiveRecord::Base # FIXME 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 :subscribe_users after_create {|comment| Subscribe.new_comment_notification(comment)} @@ -35,20 +34,6 @@ class Comment < ActiveRecord::Base 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 self.commentable.subscribes.create(:user_id => self.user_id) if !self.commentable.subscribes.exists?(:user_id => self.user_id) end diff --git a/config/routes.rb b/config/routes.rb index b3ef45c46..1daa1fe29 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -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/commit/raw/:commit_hash/*path', :controller => "git/blobs", :action => :raw, :as => :raw_commit - #root :to => "platforms#index" root :to => "activity_feeds#index" match '/forbidden', :to => 'platforms#forbidden', :as => 'forbidden' end