Search Results

Search found 2 results on 1 pages for 'macsniper'.

Page 1/1 | 1 

  • Rails gives wrong headers after upgrade 2.3.5 -> 2.3.8

    - by macsniper
    I just upgraded from rails 2.3.5 to rails 2.3.8, but now my redirects are not working properly. I get the following as the response HTTP Headers: HTTP/1.1 302 Moved Temporarily Date: Wed, 02 Jun 2010 09:40:39 GMT Content-Length: 93 Content-Type: text/html whereas I got previous: HTTP/1.1 302 Moved Temporarily Connection: close Date: Wed, 02 Jun 2010 09:41:18 GMT Set-Cookie: _session_id=<correct id>; path=/ Status: 302 Found Location: <correct url> Cache-Control: no-cache Server: Mongrel 1.1.5 Content-Type: text/html; charset=utf-8 Content-Length: 93 Anyone knows how to fix this? Despite the fact that the redirect is not working, the login-cookie is not set too (but I think, this is both related somehow). I have already tried to override redirect_to in order to set response.headers['Location'] etc., but they did not appear in the response.

    Read the article

  • Rails uses wrong class in belongs_to

    - by macsniper
    I have an application managing software tests and a class called TestResult: class TestResult < ActiveRecord::Base belongs_to :test_case, :class_name => "TestCase" end I'm right now migrating from Rails 1.x to 2.3.5. In Rails 1.x everything works fine. When trying to access the association in Rails 2.3.5, I get the following error: NoMethodError: undefined method 'find' for ActiveRecord::TestCase:Class from /usr/lib/ruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/associations/belongs_to_association.rb:49:in 'send' from /usr/lib/ruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/associations/belongs_to_association.rb:49:in 'find_target' from /usr/lib/ruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/associations/association_proxy.rb:239:in 'load_target' from /usr/lib/ruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/associations/association_proxy.rb:112:in 'reload' from /usr/lib/ruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/associations.rb:1250:in 'test_case' My Question is: how can I tell Rails to use my TestCase-class instead of ActiveRecord::TestCase. TestCase class: class TestCase < ActiveRecord::Base set_table_name "test_case" has_many :test_results belongs_to :component, :foreign_key => "subsystem_id" belongs_to :domain, :foreign_key => "area_id" belongs_to :use_case, :foreign_key => "use_case_id" end

    Read the article

1