fix searches

This commit is contained in:
albert
2013-02-17 21:09:25 -05:00
parent 424c9c94a8
commit 44682156c0
12 changed files with 7 additions and 37 deletions

View File

@@ -29,7 +29,6 @@ gem 'rmagick', :require => "RMagick"
gem 'daemons'
gem 'net-ssh'
gem 'net-sftp'
gem 'sys-proctable', :require => "sys/proctable"
group :development do
gem 'newrelic_rpm'

View File

@@ -159,7 +159,6 @@ GEM
super_exception_notifier (3.0.13)
actionmailer
rake
sys-proctable (0.9.2)
therubyracer (0.11.3)
libv8 (~> 3.11.8.12)
ref
@@ -208,7 +207,6 @@ DEPENDENCIES
simple_form
simplecov
super_exception_notifier
sys-proctable
therubyracer
uglifier (>= 1.0.3)
whenever

View File

@@ -6,15 +6,11 @@ class ApplicationController < ActionController::Base
before_filter :initialize_cookies
before_filter :set_title
before_filter :set_started_at_session
after_filter :log_memory_usage
layout "default"
rescue_from User::PrivilegeError, :with => :access_denied
protected
def log_memory_usage
Rails.logger.info "\e[1;31mMemory usage:\e[0m #{Memorylogic.memory_usage}\t\e[1;31mParams:\e[0m #{params.inspect}\t\e[1;31mUser: \e[0m#{CurrentUser.id}"
end
def access_denied
previous_url = params[:url] || request.fullpath

View File

@@ -14,7 +14,7 @@ class CommentsController < ApplicationController
end
def search
@search = Comment.search(params[:search])
# @search = Comment.search(params[:search])
end
def update

View File

@@ -20,8 +20,7 @@ class DmailsController < ApplicationController
end
def search
@search = Dmail.search(params[:search])
respond_with(@dmails)
# @search = Dmail.search(params[:search])
end
def show

View File

@@ -22,7 +22,7 @@ class ForumPostsController < ApplicationController
end
def search
@search = ForumPost.search(params[:search])
# @search = ForumPost.search(params[:search])
end
def show

View File

@@ -4,7 +4,7 @@ class NotesController < ApplicationController
before_filter :pass_html_id, :only => [:create]
def search
@search = Note.search(params[:search])
# @search = Note.search(params[:search])
end
def index

View File

@@ -21,7 +21,7 @@ class PoolsController < ApplicationController
end
def search
@search = Pool.search(params[:search])
# @search = Pool.search(params[:search])
end
def show

View File

@@ -8,6 +8,6 @@ class PostVersionsController < ApplicationController
end
def search
@search = PostVersion.search(params[:search])
# @search = PostVersion.search(params[:search])
end
end

View File

@@ -21,7 +21,7 @@ class UsersController < ApplicationController
end
def search
@search = User.search(params[:search])
# @search = User.search(params[:search])
end
def show

View File

@@ -1,14 +0,0 @@
module Memorylogic
class << self
include ActionView::Helpers::NumberHelper
end
def self.memory_usage
ps = Sys::ProcTable.ps(Process.pid)
if ps.respond_to?(:pctmem)
ps.pctmem
else
0
end
end
end

View File

@@ -1,8 +0,0 @@
ActiveSupport::BufferedLogger.class_eval do
def add_with_memory_info(severity, message = nil, progname = nil, &block)
str = "\t\e[1;31mMemory usage:\e[0m #{Memorylogic.memory_usage}"
add_without_memory_info(severity, message + str, progname, &block)
end
alias_method_chain :add, :memory_info
end