fix
This commit is contained in:
3
Gemfile
3
Gemfile
@@ -29,9 +29,10 @@ gem 'rmagick', :require => "RMagick"
|
|||||||
gem 'daemons'
|
gem 'daemons'
|
||||||
gem 'net-ssh'
|
gem 'net-ssh'
|
||||||
gem 'net-sftp'
|
gem 'net-sftp'
|
||||||
# gem 'newrelic_rpm'
|
|
||||||
|
|
||||||
group :development do
|
group :development do
|
||||||
|
gem 'newrelic_rpm'
|
||||||
|
gem 'ruby-prof'
|
||||||
gem 'pry'
|
gem 'pry'
|
||||||
gem 'awesome_print'
|
gem 'awesome_print'
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -94,6 +94,7 @@ GEM
|
|||||||
net-sftp (2.1.1)
|
net-sftp (2.1.1)
|
||||||
net-ssh (>= 2.6.5)
|
net-ssh (>= 2.6.5)
|
||||||
net-ssh (2.6.5)
|
net-ssh (2.6.5)
|
||||||
|
newrelic_rpm (3.5.5.38)
|
||||||
nokogiri (1.5.6)
|
nokogiri (1.5.6)
|
||||||
ntlm-http (0.1.1)
|
ntlm-http (0.1.1)
|
||||||
pg (0.12.2)
|
pg (0.12.2)
|
||||||
@@ -129,6 +130,7 @@ GEM
|
|||||||
json (~> 1.4)
|
json (~> 1.4)
|
||||||
ref (1.0.2)
|
ref (1.0.2)
|
||||||
rmagick (2.13.2)
|
rmagick (2.13.2)
|
||||||
|
ruby-prof (0.12.2)
|
||||||
sass (3.2.5)
|
sass (3.2.5)
|
||||||
sass-rails (3.2.6)
|
sass-rails (3.2.6)
|
||||||
railties (~> 3.2.0)
|
railties (~> 3.2.0)
|
||||||
@@ -192,11 +194,13 @@ DEPENDENCIES
|
|||||||
mocha
|
mocha
|
||||||
net-sftp
|
net-sftp
|
||||||
net-ssh
|
net-ssh
|
||||||
|
newrelic_rpm
|
||||||
nokogiri
|
nokogiri
|
||||||
pg (= 0.12.2)
|
pg (= 0.12.2)
|
||||||
pry
|
pry
|
||||||
rails (= 3.2.12)
|
rails (= 3.2.12)
|
||||||
rmagick
|
rmagick
|
||||||
|
ruby-prof
|
||||||
sanitize!
|
sanitize!
|
||||||
sass-rails
|
sass-rails
|
||||||
shoulda
|
shoulda
|
||||||
|
|||||||
@@ -618,7 +618,7 @@ class Post < ActiveRecord::Base
|
|||||||
|
|
||||||
module CacheMethods
|
module CacheMethods
|
||||||
def expire_cache(tag_name)
|
def expire_cache(tag_name)
|
||||||
if Post.fast_count("") < 1000
|
if Post.fast_count("").to_i < 1000
|
||||||
Cache.delete(Post.count_cache_key(""))
|
Cache.delete(Post.count_cache_key(""))
|
||||||
end
|
end
|
||||||
Cache.delete(Post.count_cache_key(tag_name))
|
Cache.delete(Post.count_cache_key(tag_name))
|
||||||
|
|||||||
Reference in New Issue
Block a user