changeset 52:4c782f8d835b

Merge.
author Edho Arief <edho@myconan.net>
date Thu, 04 Oct 2012 04:23:39 +0700
parents 86948069ef60 (diff) 36d07f047ec2 (current diff)
children 817c54a72b58
files
diffstat 3 files changed, 5 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/app/controllers/pastes_controller.rb	Thu Oct 04 04:23:00 2012 +0700
+++ b/app/controllers/pastes_controller.rb	Thu Oct 04 04:23:39 2012 +0700
@@ -1,4 +1,5 @@
 class PastesController < ApplicationController
+  caches_page :show
   # GET /pastes/1
   # GET /pastes/1.json
   def show
@@ -17,7 +18,6 @@
     begin
       @paste.paste = Paste.find(params[:base]).paste
     rescue
-      nil
     end
 
     respond_to do |format|
--- a/app/views/pastes/show.html.erb	Thu Oct 04 04:23:00 2012 +0700
+++ b/app/views/pastes/show.html.erb	Thu Oct 04 04:23:39 2012 +0700
@@ -1,6 +1,4 @@
 <% provide :title, 'Show' %>
-<p id="notice"><%= notice %></p>
-
 <div class="page-header">
   <h1>Paste</h1>
 </div>
--- a/config/application.rb	Thu Oct 04 04:23:00 2012 +0700
+++ b/config/application.rb	Thu Oct 04 04:23:39 2012 +0700
@@ -24,6 +24,10 @@
     # Custom directories with classes and modules you want to be autoloadable.
     # config.autoload_paths += %W(#{config.root}/extras)
 
+    # Enable threaded mode except for rake tasks as it doesn't work quite well
+    # Reference: http://groups.google.com/group/rubyonrails-core/browse_thread/thread/b13dbe0b8f12b7dc
+    config.threadsafe! unless $rails_rake_task
+
     # Only load the plugins named here, in the order given (default is alphabetical).
     # :all can be used as a placeholder for all plugins not explicitly named.
     # config.plugins = [ :exception_notification, :ssl_requirement, :all ]