Skip to content

Instantly share code, notes, and snippets.

@AquaGeek
AquaGeek / 000-belongs_to_callback_support.diff
Created May 14, 2011 02:10
Rails Lighthouse ticket #1564
From cc0e32a5931ca706ff1414e37dd1be7411c88413 Mon Sep 17 00:00:00 2001
From: Sean O'Brien <[email protected]>
Date: Thu, 11 Dec 2008 21:21:51 -0800
Subject: [PATCH] added support for before_add, before_remove, after_add, and after_remove to belongs_to associations
---
activerecord/lib/active_record/associations.rb | 3 +-
.../associations/association_collection.rb | 11 ---
.../associations/association_proxy.rb | 11 +++
.../associations/belongs_to_association.rb | 8 ++-
From 9bc856358dd5a60b3d088f2047511d23a2b27c9a Mon Sep 17 00:00:00 2001
From: Amiel Martin <[email protected]>
Date: Tue, 24 Feb 2009 21:25:52 -0800
Subject: [PATCH] added tests to exemplify incorrect output from ActiveSupport::Duration
---
activesupport/test/core_ext/duration_test.rb | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/activesupport/test/core_ext/duration_test.rb b/activesupport/test/core_ext/duration_test.rb
From 19d911aedaabbeeb7d3505b4085f726f5830bbe8 Mon Sep 17 00:00:00 2001
From: Charles Nutter <[email protected]>
Date: Sat, 28 Feb 2009 17:47:00 -0600
Subject: [PATCH] Move away from using exec to launch console.
---
railties/lib/commands/console.rb | 18 +++++++++---------
1 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/railties/lib/commands/console.rb b/railties/lib/commands/console.rb
@AquaGeek
AquaGeek / beginning_of_hour-2-3.diff
Created May 14, 2011 02:10
Rails Lighthouse ticket #2114
From 26d9b864009b522e1fa87245d76c0a39a8b148ea Mon Sep 17 00:00:00 2001
From: Matias Flores <[email protected]>
Date: Sun, 27 Sep 2009 10:59:26 -0300
Subject: [PATCH] Adding beginning_of_our and end_of_hour
---
.../core_ext/date_time/calculations.rb | 10 ++++++++
.../active_support/core_ext/time/calculations.rb | 10 ++++++++
activesupport/test/core_ext/date_time_ext_test.rb | 8 ++++++
activesupport/test/core_ext/time_ext_test.rb | 24 ++++++++++++++++++++
From 8068115dfddb0818a64906a5e05213f5841d6aaf Mon Sep 17 00:00:00 2001
From: Jonas Nicklas <[email protected]>
Date: Wed, 18 Mar 2009 23:15:03 +0100
Subject: [PATCH] failing test for mixed character encodings in templates
---
actionpack/test/fixtures/test/utf8_mixed.html.erb | 1 +
actionpack/test/template/render_test.rb | 6 ++++++
2 files changed, 7 insertions(+), 0 deletions(-)
create mode 100644 actionpack/test/fixtures/test/utf8_mixed.html.erb
@AquaGeek
AquaGeek / named_scopes_nested_order.diff
Created May 14, 2011 02:15
Rails Lighthouse ticket #2253
From 06185eec6245ef598e96f74a736eb2815c572abd Mon Sep 17 00:00:00 2001
From: Erik Andrejko <[email protected]>
Date: Mon, 16 Mar 2009 08:25:51 -0500
Subject: [PATCH] added failing tests
---
activerecord/test/cases/method_scoping_test.rb | 10 ++++++++++
activerecord/test/cases/named_scope_test.rb | 14 ++++++++++++++
activerecord/test/fixtures/monks.yml | 16 ++++++++++++++++
activerecord/test/models/monk.rb | 10 ++++++++++
From 75ec35c108f6df8040c1f4b9c24ef20c0b23ec75 Mon Sep 17 00:00:00 2001
From: Alexander Podgorbunsky <[email protected]>
Date: Thu, 26 Mar 2009 15:00:12 +0300
Subject: [PATCH] fixes the problem of not overriding :order key in defaul scope by same key in named scope
---
activerecord/lib/active_record/named_scope.rb | 4 ++--
activerecord/test/cases/method_scoping_test.rb | 8 ++++----
2 files changed, 6 insertions(+), 6 deletions(-)
@AquaGeek
AquaGeek / base.patch
Created May 14, 2011 02:15
Rails Lighthouse ticket #2357
--- /Library/Ruby/Gems/1.8/gems/activerecord-2.3.2/lib/active_record/base.rb 2009-04-21 01:27:52.000000000 -0500
+++ base.rb 2009-04-21 01:24:35.000000000 -0500
@@ -1492,11 +1492,12 @@
# Merges conditions so that the result is a valid +condition+
def merge_conditions(*conditions)
+ chain_aliases = conditions.extract_options! || Hash.new
segments = []
conditions.each do |condition|
@AquaGeek
AquaGeek / render_text_proc_in_testing.patch
Created May 14, 2011 02:15
Rails Lighthouse ticket #2423
diff --git a/actionpack/lib/action_controller/test_process.rb b/actionpack/lib/action_controller/test_process.rb
index 9de3fab..c310f9c 100644
--- a/actionpack/lib/action_controller/test_process.rb
+++ b/actionpack/lib/action_controller/test_process.rb
@@ -266,15 +266,26 @@ module ActionController #:nodoc:
# Returns binary content (downloadable file), converted to a String
def binary_content
- raise "Response body is not a Proc: #{body.inspect}" unless body.kind_of?(Proc)
+ raise "Response body is not a Proc: #{body.inspect}" unless @body.kind_of?(Proc)
@AquaGeek
AquaGeek / 2439_rails_3.patch
Created May 14, 2011 02:15
Rails Lighthouse ticket #2439
From 48d33664cb4afeec2623f75848375610545dbafd Mon Sep 17 00:00:00 2001
From: dpickett <[email protected]>
Date: Tue, 20 Apr 2010 21:24:13 -0400
Subject: [PATCH] verify multipart doesn't break param encoding [#2439]
in Rails 2.3.x Steven Luscher observed this was
broken. This patch validates the errant behavior
was not present in Rails 3
---
actionpack/test/controller/integration_test.rb | 33 ++++++++++++++++++++++++