Skip to content

Instantly share code, notes, and snippets.

[lifo@null rails (master)]$ git pull
remote: Counting objects: 193, done.
remote: Compressing objects: 100% (109/109), done.
remote: Total 114 (delta 89), reused 0 (delta 0)
Receiving objects: 100% (114/114), 12.14 KiB, done.
Resolving deltas: 100% (89/89), completed with 48 local objects.
From git@github.com:rails/rails
a491b19..6720b25 2-3-stable -> origin/2-3-stable
97159fa..b5dfdc7 HEAD -> origin/HEAD
error: Ref refs/remotes/origin/master is at b5dfdc714fab7d2836e0a979ca88b4a17db9ec06 but expected 97159fad6a69cc0bc6fe504e2063bb98fcf6e42d
# before
def read(name, options = nil)
super
file_name = real_file_path(name)
return nil unless File.exist?(file_name)
if (expires = expires_in(options)) > 0 and
(Time.now - File.mtime(file_name)) > expires
module Enumerable
def return
each do |i|
value = yield(i)
return value if value
end
nil
end
end
diff --git a/activesupport/lib/active_support/new_callbacks.rb b/activesupport/lib/active_support/new_callbacks.rb
index 039d0fa..8d60653 100644
--- a/activesupport/lib/active_support/new_callbacks.rb
+++ b/activesupport/lib/active_support/new_callbacks.rb
@@ -287,6 +287,14 @@ module ActiveSupport
when Proc
@klass.send(:define_method, method_name, &filter)
method_name << (filter.arity == 1 ? "(self)" : "")
+ when Method
+ @klass.send(:define_method, "#{method_name}_method") { filter }
diff --git a/actionpack/lib/action_controller/testing/integration.rb b/actionpack/lib/action_controller/testing/integration.rb
index d6991ab..a8e8f16 100644
--- a/actionpack/lib/action_controller/testing/integration.rb
+++ b/actionpack/lib/action_controller/testing/integration.rb
@@ -62,8 +62,8 @@ module ActionController
# with 'HTTP_' if not already.
def xml_http_request(request_method, path, parameters = nil, headers = nil)
headers ||= {}
- headers['X-Requested-With'] = 'XMLHttpRequest'
- headers['Accept'] ||= [Mime::JS, Mime::HTML, Mime::XML, 'text/xml', Mime::ALL].join(', ')
Current Guides
==============
1. Active Support Overview - Xavi Noria
2. Action View Overview - Trevor
3. Ajax on Rails - Peter Szinek
4. Multi model Forms - Eloy ??
5. Named Scopes - Kevin Alford
6. Active Record Basics - ??
7. Active Resource Overview - ??
diff --git a/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb b/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb
index 913bb52..ec204d0 100644
--- a/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb
+++ b/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb
@@ -392,9 +392,28 @@ module ActiveRecord
quote_string(s)
end
+ # Checks the following cases:
+ #
require 'rubygems'
require 'curb'
require "net/http"
require 'benchmark'
# http://0.0.0.0:8080
#
# class HomeController < ApplicationController
# def index
# sleep 3
diff --git a/actionpack/test/activerecord/polymorphic_routes_test.rb b/actionpack/test/activerecord/polymorphic_routes_test.rb
new file mode 100644
index 0000000..24eb16d
--- /dev/null
+++ b/actionpack/test/activerecord/polymorphic_routes_test.rb
@@ -0,0 +1,48 @@
+require 'active_record_unit'
+
+class PolymorphicRoutesTest < ActionController::TestCase
+ include ActionController::UrlWriter
diff --git a/railties/lib/commands/plugin.rb b/railties/lib/commands/plugin.rb
index 8589b16..c6c9892 100644
--- a/railties/lib/commands/plugin.rb
+++ b/railties/lib/commands/plugin.rb
@@ -1,47 +1,8 @@
# Rails Plugin Manager.
-#
-# Listing available plugins:
-#
-# $ ./script/plugin list