fix searches
This commit is contained in:
1
Gemfile
1
Gemfile
@@ -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'
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -14,7 +14,7 @@ class CommentsController < ApplicationController
|
||||
end
|
||||
|
||||
def search
|
||||
@search = Comment.search(params[:search])
|
||||
# @search = Comment.search(params[:search])
|
||||
end
|
||||
|
||||
def update
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -22,7 +22,7 @@ class ForumPostsController < ApplicationController
|
||||
end
|
||||
|
||||
def search
|
||||
@search = ForumPost.search(params[:search])
|
||||
# @search = ForumPost.search(params[:search])
|
||||
end
|
||||
|
||||
def show
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -21,7 +21,7 @@ class PoolsController < ApplicationController
|
||||
end
|
||||
|
||||
def search
|
||||
@search = Pool.search(params[:search])
|
||||
# @search = Pool.search(params[:search])
|
||||
end
|
||||
|
||||
def show
|
||||
|
||||
@@ -8,6 +8,6 @@ class PostVersionsController < ApplicationController
|
||||
end
|
||||
|
||||
def search
|
||||
@search = PostVersion.search(params[:search])
|
||||
# @search = PostVersion.search(params[:search])
|
||||
end
|
||||
end
|
||||
|
||||
@@ -21,7 +21,7 @@ class UsersController < ApplicationController
|
||||
end
|
||||
|
||||
def search
|
||||
@search = User.search(params[:search])
|
||||
# @search = User.search(params[:search])
|
||||
end
|
||||
|
||||
def show
|
||||
|
||||
@@ -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
|
||||
@@ -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
|
||||
Reference in New Issue
Block a user