So i've come to realize that this can be fixed by placing the following 
in an initializer file under config/initializers:

class ActiveResource::Connection

      # Creates new Net::HTTP instance for communication with
      # remote service and resources.
      def http
        http             = Net::HTTP.new(@site.host, @site.port)
        http.use_ssl     = @site.is_a?(URI::HTTPS)
        http.verify_mode = OpenSSL::SSL::VERIFY_NONE if http.use_ssl
        http.read_timeout = @timeout if @timeout # If timeout is not 
set, the default Net::HTTP timeout (60s) is used.
        http.open_timeout = @timeout if @timeout #I added this line
        http
      end
end


However, I'm not really sure I understand how this works. The function 
I'm placing here apparently overrides the same-named function in 
ActiveResource::Connection, but that function is private, so I'm unsure 
as to how there's no errors? I'm not finding much online about how you 
can use initializers to override base rails classes.
-- 
Posted via http://www.ruby-forum.com/.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to