Ruby on rails 铁路及;Internet Explorer的restful_身份验证问题(所有版本)

Ruby on rails 铁路及;Internet Explorer的restful_身份验证问题(所有版本),ruby-on-rails,internet-explorer,Ruby On Rails,Internet Explorer,我部署了一个rails应用程序,在Safari、Firefox和Opera中运行良好。然而,当我尝试从InternetExplorer6+登录时,我会进入正确的页面,但没有显示任何内容。消息人士说所有东西都在那里,但页面只是空白。当我点击刷新时,一切正常。有人有这方面的经验吗 相关代码: ##应用程序控制器 # Filters added to this controller apply to all controllers in the application. # Likewise, al

我部署了一个rails应用程序,在Safari、Firefox和Opera中运行良好。然而,当我尝试从InternetExplorer6+登录时,我会进入正确的页面,但没有显示任何内容。消息人士说所有东西都在那里,但页面只是空白。当我点击刷新时,一切正常。有人有这方面的经验吗


相关代码:

##应用程序控制器

# Filters added to this controller apply to all controllers in the application.
# Likewise, all the methods added will be available for all controllers.

class ApplicationController < ActionController::Base
  helper :all # include all helpers, all the time 
  layout 'public'
  before_filter :presenter

  include AuthenticatedSystem
  # See ActionController::RequestForgeryProtection for details
  # Uncomment the :secret if you're not using the cookie session store
  protect_from_forgery  :secret => 'secrete code'

  # See ActionController::Base for details 
  # Uncomment this to filter the contents of submitted sensitive data parameters
  # from your application log (in this case, all fields with names like "password"). 
  # filter_parameter_logging :password

  def index
  end

  def terms
  end


  def contact
    @contact = Contact.new
  end

  def send_contact_request
    @contact = Contact.new(params['contact'])

    if @contact.save
     begin
        UserMailer.deliver_contact_message(@contact)
        flash[:notice] = @presenter.notify("notification", "Success!", "Your message has been delivered.")
        redirect_to root_path
     rescue
        flash[:notice] = @presenter.notify("error", "Error!", "There was an error delivering your request.")
        render :action=>"contact"
    end
    else
      render :action=>"contact"
    end
  end

  def schedule
    @schedule = Schedule.new
  end

  def schedule_testing
    @schedule = Schedule.new(params['schedule'])

    if @schedule.save && @schedule.agreed?
        UserMailer.deliver_testing_request(@schedule)
        flash[:notice] = @presenter.notify("notification", "Success!", "Your request has been delivered.")
        redirect_to root_path
    else
      flash[:notice] = @presenter.notify("error", "Error!", "There was an error delivering your request.")
      render :action => "schedule"
    end
  end

  protected
    def presenter 
      @presenter = AdminPresenter.new(:param => current_user)
    end
end
# This controller handles the login/logout function of the site.  
class SessionsController < ApplicationController

  # Be sure to include AuthenticationSystem in Application Controller instead
  include AuthenticatedSystem

  layout 'public'

  before_filter :presenter

  # render new.rhtml
  def new
  end

  def create
    logout_keeping_session!
    user = User.authenticate(params[:email], params[:password])
    if user
      # Protects against session fixation attacks, causes request forgery
      # protection if user resubmits an earlier form using back
      # button. Uncomment if you understand the tradeoffs.
      # reset_session
      self.current_user = user
      new_cookie_flag = (params[:remember_me] == "1")
      handle_remember_cookie! new_cookie_flag
      if user.password_changed?    
        redirect_back_or_default(admin_index_path)
        flash[:notice] = @presenter.notify("notification", "Welcome!", "Logged in successfully.")
      else
        redirect_to edit_admin_user_path(user)        
        flash[:notice] = @presenter.notify("warning", "Welcome!", "Please change your password to something more memorable.")
      end
    else
      note_failed_signin
      @email       = params[:email]
      @remember_me = params[:remember_me]
      render :action => 'new'
    end
  end

  def destroy
    logout_killing_session!
    redirect_to admin_index_path
    flash.now[:notice] = @presenter.notify("notification", "Success!", "You have been logged out.")
  end

protected
  # Track failed login attempts
  def note_failed_signin
    @email = params[:email]
    flash[:notice] = @presenter.notify("error", "Error!", "Could not log you in as #{@email}.")
    logger.warn "Failed login for '#{params[:email]}' from #{request.remote_ip} at #{Time.now.utc}"
  end

    def presenter
      @presenter = AdminPresenter.new(:param => @map)
    end
end
##记录Firefox的响应

Processing SessionsController#create (for IP ADDY at 2009-05-12 14:46:57) [POST]
  Session ID: 163aa367284e7734a17c545fcf85bc95
  Parameters: {"commit"=>"Log in", "authenticity_token"=>"bc549a7f2ae4a937044db12e283c1af13e045b50", "password"=>"secret", "email"=>"secret@secret.com"}
Cookie set: auth_token=; path=/; expires=Thu, 01 Jan 1970 00:00:00 GMT
  [4;35;1mUser Load (0.1ms)[0m   [0mSELECT * FROM `users` WHERE (email = 'zkwentz@gmail.com' and activated_at IS NOT NULL) LIMIT 1[0m
  [4;36;1mSQL (0.0ms)[0m   [0;1mBEGIN[0m
  [4;35;1mSQL (0.0ms)[0m   [0mCOMMIT[0m
Cookie set: auth_token=; path=/
Redirected to /admin
Completed in 2ms (DB: 0) | 302 Found [http://www.gessnerengineering.com/session]


Processing AdminController#index (for IP ADDY at 2009-05-12 14:46:57) [GET]
  Session ID: 163aa367284e7734a17c545fcf85bc95
  [4;36;1mUser Load (0.1ms)[0m   [0;1mSELECT * FROM `users` WHERE (`users`.`id` = 12) LIMIT 1[0m
  [4;35;1mProfile Load (0.0ms)[0m   [0mSELECT * FROM `profiles` WHERE (approved = 0) [0m
  [4;36;1mProject Load (0.0ms)[0m   [0;1mSELECT * FROM `projects` WHERE (approved = 0) [0m
  [4;35;1mMap Load (0.0ms)[0m   [0mSELECT * FROM `maps` WHERE (approved = 0) [0m
  [4;36;1mProfile Load (0.0ms)[0m   [0;1mSELECT * FROM `profiles` WHERE (score_approved = 0) [0m
Rendering template within layouts/admin
Rendering admin/index
  [4;35;1mProfile Load (0.0ms)[0m   [0mSELECT * FROM `profiles` WHERE (`profiles`.user_id = 12) LIMIT 1[0m
  [4;36;1mRole Load (0.0ms)[0m   [0;1mSELECT * FROM `roles` WHERE (`roles`.`id` = 1) [0m
Rendered admin/users/_user_bar (0.1ms)
  [4;35;1mCACHE (0.0ms)[0m   [0mSELECT * FROM `roles` WHERE (`roles`.`id` = 1) [0m
Completed in 4ms (View: 2, DB: 3) | 200 OK [http://www.gessnerengineering.com/admin]

尝试使用类似的方法验证标记(HTML)。IE有时(令人惊讶地)对标记更严格,有时如果它不能“弄清楚”,它会轰炸并不会呈现元素。验证器有时可以跟踪未关闭的标记等。

尝试使用类似的方法验证标记(HTML)。IE有时(令人惊讶地)对标记更严格,有时如果它不能“弄清楚”,它会轰炸并不会呈现元素。验证器有时可以跟踪未关闭的标记等。

您可以添加视图和CSS吗?这听起来像是渲染问题,而不是控制器问题。您可以添加视图和CSS吗?这听起来像是一个渲染问题,而不是控制器问题。我发现有时无效的css也会导致这种问题,所以也值得验证一下——尽管我发现safari对无效的css更挑剔。@paulsnotes:这是一个很好的观点。当我弄乱了选择器时,我确实体验过IE中一些非常随机的渲染。我发现有时候无效的css也会导致这种情况,所以也值得验证一下——尽管我发现safari对无效的css更挑剔。@paulsnotes:这是一个很好的观点。当我搞砸了一个选择器时,我确实体验过IE中一些非常随机的渲染。
Processing SessionsController#create (for IP ADDY at 2009-05-12 14:46:57) [POST]
  Session ID: 163aa367284e7734a17c545fcf85bc95
  Parameters: {"commit"=>"Log in", "authenticity_token"=>"bc549a7f2ae4a937044db12e283c1af13e045b50", "password"=>"secret", "email"=>"secret@secret.com"}
Cookie set: auth_token=; path=/; expires=Thu, 01 Jan 1970 00:00:00 GMT
  [4;35;1mUser Load (0.1ms)[0m   [0mSELECT * FROM `users` WHERE (email = 'zkwentz@gmail.com' and activated_at IS NOT NULL) LIMIT 1[0m
  [4;36;1mSQL (0.0ms)[0m   [0;1mBEGIN[0m
  [4;35;1mSQL (0.0ms)[0m   [0mCOMMIT[0m
Cookie set: auth_token=; path=/
Redirected to /admin
Completed in 2ms (DB: 0) | 302 Found [http://www.gessnerengineering.com/session]


Processing AdminController#index (for IP ADDY at 2009-05-12 14:46:57) [GET]
  Session ID: 163aa367284e7734a17c545fcf85bc95
  [4;36;1mUser Load (0.1ms)[0m   [0;1mSELECT * FROM `users` WHERE (`users`.`id` = 12) LIMIT 1[0m
  [4;35;1mProfile Load (0.0ms)[0m   [0mSELECT * FROM `profiles` WHERE (approved = 0) [0m
  [4;36;1mProject Load (0.0ms)[0m   [0;1mSELECT * FROM `projects` WHERE (approved = 0) [0m
  [4;35;1mMap Load (0.0ms)[0m   [0mSELECT * FROM `maps` WHERE (approved = 0) [0m
  [4;36;1mProfile Load (0.0ms)[0m   [0;1mSELECT * FROM `profiles` WHERE (score_approved = 0) [0m
Rendering template within layouts/admin
Rendering admin/index
  [4;35;1mProfile Load (0.0ms)[0m   [0mSELECT * FROM `profiles` WHERE (`profiles`.user_id = 12) LIMIT 1[0m
  [4;36;1mRole Load (0.0ms)[0m   [0;1mSELECT * FROM `roles` WHERE (`roles`.`id` = 1) [0m
Rendered admin/users/_user_bar (0.1ms)
  [4;35;1mCACHE (0.0ms)[0m   [0mSELECT * FROM `roles` WHERE (`roles`.`id` = 1) [0m
Completed in 4ms (View: 2, DB: 3) | 200 OK [http://www.gessnerengineering.com/admin]