Skip to content
Browse files

Arrumando o sweeper.

  • Loading branch information...
1 parent 5e944ea commit 91d49a542465e68e9cec207581610959eaee57e2 @tapajos committed Nov 12, 2008
View
2 app/controllers/admin/podcasts_controller.rb
@@ -1,5 +1,7 @@
class Admin::PodcastsController < ResourceController::Base
+ cache_sweeper :podcast_sweeper
+
include AuthenticatedSystem
before_filter :login_required
View
2 app/controllers/podcasts_controller.rb
@@ -1,7 +1,5 @@
class PodcastsController < ApplicationController
caches_page :index
- cache_sweeper :podcast_sweeper , :only => [:index]
-
def method_missing(name, *args)
@podcast = Podcast.find_by_permalink(name.to_s)
View
1 app/sweepers/podcast_sweeper.rb
@@ -17,6 +17,7 @@ def after_destroy(podcast)
def expire_cache_for(record)
cache_dir = ActionController::Base.page_cache_directory
FileUtils.rm_r(Dir.glob("#{cache_dir}/index.html")) rescue Errno::ENOENT
+ FileUtils.rm_r(Dir.glob("#{cache_dir}/podcasts.html")) rescue Errno::ENOENT
FileUtils.rm_r(Dir.glob("#{cache_dir}/podcast/*.*")) rescue Errno::ENOENT
end
end
View
6 db/schema.rb
@@ -25,12 +25,6 @@
t.datetime "updated_at"
end
- create_table "schema_migrations", :id => false, :force => true do |t|
- t.string "version", :null => false
- end
-
- add_index "schema_migrations", ["version"], :name => "unique_schema_migrations", :unique => true
-
create_table "users", :force => true do |t|
t.string "login", :limit => 40
t.string "name", :limit => 100, :default => ""

0 comments on commit 91d49a5

Please sign in to comment.
Something went wrong with that request. Please try again.