rails 3 fixes
This commit is contained in:
@@ -35,7 +35,7 @@ class ApplicationController < ActionController::Base
|
||||
respond_to do |format|
|
||||
format.html {
|
||||
if logged_in?
|
||||
render :file => "#{RAILS_ROOT}/public/401.html", :status => 401
|
||||
render :file => "#{Rails.root}/public/401.html", :status => 401
|
||||
else
|
||||
login_by_html
|
||||
end
|
||||
@@ -53,7 +53,7 @@ class ApplicationController < ActionController::Base
|
||||
# Registro nao encontrado
|
||||
elsif (RAILS_ENV == 'production') and exception.is_a?(ActiveRecord::RecordNotFound)
|
||||
respond_to do |format|
|
||||
format.html { render :file => "#{RAILS_ROOT}/public/404.html", :status => 404 }
|
||||
format.html { render :file => "#{Rails.root}/public/404.html", :status => 404 }
|
||||
format.xml { head 404 }
|
||||
end
|
||||
|
||||
|
||||
@@ -98,7 +98,7 @@ class AttachmentsController < ApplicationController
|
||||
|
||||
def download
|
||||
|
||||
send_file("#{RAILS_ROOT}/public/upload/#{@course.id}/#{@attachment.id}",
|
||||
send_file("#{Rails.root}/public/upload/#{@course.id}/#{@attachment.id}",
|
||||
:filename => @attachment.file_name,
|
||||
:type => @attachment.content_type,
|
||||
:disposition => 'inline',
|
||||
|
||||
@@ -18,8 +18,8 @@
|
||||
|
||||
class WikiController < ApplicationController
|
||||
|
||||
verify :params => :text, :only => :preview, :redirect_to => { :action => :show }
|
||||
verify :params => [:from, :to], :only => :diff, :redirect_to => { :action => :versions }
|
||||
#verify :params => :text, :only => :preview, :redirect_to => { :action => :show }
|
||||
#verify :params => [:from, :to], :only => :diff, :redirect_to => { :action => :versions }
|
||||
|
||||
#after_filter :cache_sweep, :only => [ :create, :update, :destroy, :move_up,
|
||||
# :move_down, :undelete ]
|
||||
|
||||
Reference in New Issue
Block a user