Skip to content

Commit

Permalink
Change production settings and add an action to remove all posts
Browse files Browse the repository at this point in the history
  • Loading branch information
olabini committed Apr 6, 2009
1 parent c66c74b commit 19b33cb
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
8 changes: 8 additions & 0 deletions app/controllers/blogs_controller.rb
Expand Up @@ -50,4 +50,12 @@ def remove_post

redirect_to blog_url(blog)
end

def remove_all_posts
Post.all.each do |p|
p.delete!
end

redirect_to root_url
end
end
2 changes: 1 addition & 1 deletion config/environments/production.rb
Expand Up @@ -41,7 +41,7 @@ def method_missing(name, *args, &block)
config.logger = ServletContextLogger.new

# Full error reports are disabled and caching is turned on
config.action_controller.consider_all_requests_local = true
config.action_controller.consider_all_requests_local = false
config.action_controller.perform_caching = true

# Use a different cache store in production
Expand Down

0 comments on commit 19b33cb

Please sign in to comment.