diff --git a/app/controllers/fckeditor_controller.rb b/app/controllers/fckeditor_controller.rb index e2d0d4b..a522570 100644 --- a/app/controllers/fckeditor_controller.rb +++ b/app/controllers/fckeditor_controller.rb @@ -133,7 +133,7 @@ def current_directory_path end def upload_directory_path - uploaded = request.relative_url_root.to_s+"#{UPLOADED}/#{params[:Type]}" + uploaded = ActionController::Base.relative_url_root.to_s+"#{UPLOADED}/#{params[:Type]}" "#{uploaded}#{params[:CurrentFolder]}" end diff --git a/lib/fckeditor.rb b/lib/fckeditor.rb index 65b1aac..4eebe6e 100644 --- a/lib/fckeditor.rb +++ b/lib/fckeditor.rb @@ -35,7 +35,7 @@ def fckeditor_textarea(object, field, options = {}) inputs = "\n" end - js_path = "#{request.relative_url_root}/javascripts" + js_path = "#{ActionController::Base.relative_url_root}/javascripts" base_path = "#{js_path}/fckeditor/" return inputs << javascript_tag("var oFCKeditor = new FCKeditor('#{id}', '#{width}', '#{height}', '#{toolbarSet}');\n" <<