This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/vendor/plugins/stringex/lib/lucky_sneaks/acts_as_url.rb b/vendor/plugins/stringex/lib/lucky_sneaks/acts_as_url.rb | |
index 156f45f..77a3ae0 100644 | |
--- a/vendor/plugins/stringex/lib/lucky_sneaks/acts_as_url.rb | |
+++ b/vendor/plugins/stringex/lib/lucky_sneaks/acts_as_url.rb | |
@@ -43,7 +43,7 @@ module LuckySneaks | |
# on a large selection, you will get much better results writing your own version with | |
# using pagination. | |
def initialize_urls | |
- find(:all, :conditions => {:url => nil}).each do |instance| | |
+ find(:all, :conditions => {self.url_attribute => nil}).each do |instance| |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'rubygems' | |
require 'active_support' | |
require 'active_support/test_case' | |
require 'test/unit' | |
class Test::Unit::TestCase | |
# Monkey it. T::U calls public_instance_methods(true) | |
def self.suite | |
method_names = public_instance_methods(false) | |
tests = method_names.delete_if {|method_name| method_name !~ /^test./} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'rubygems' | |
require 'active_support' | |
require 'active_support/test_case' | |
require 'test/unit' | |
class Test::Unit::TestCase | |
# Monkey it. T::U calls public_instance_methods(true) | |
def self.suite | |
method_names = public_instance_methods(false) | |
tests = method_names.delete_if {|method_name| method_name !~ /^test./} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/activerecord/lib/active_record/calculations.rb b/activerecord/lib/active_record/calculations.rb | |
index 634236e..5e33cf1 100644 | |
--- a/activerecord/lib/active_record/calculations.rb | |
+++ b/activerecord/lib/active_record/calculations.rb | |
@@ -285,11 +285,15 @@ module ActiveRecord | |
operation = operation.to_s.downcase | |
case operation | |
when 'count' then value.to_i | |
- when 'sum' then value =~ /\./ ? value.to_f : value.to_i | |
- when 'avg' then value && value.to_f |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'abstract_unit' | |
class WraithAttack < StandardError | |
end | |
class NuclearExplosion < StandardError | |
end | |
class MadRonon < StandardError | |
attr_accessor :message |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[lifo@null mini]$ grep 'def refute' test.rb | |
def refute test, msg = nil | |
def refute_empty obj, msg = nil | |
def refute_equal exp, act, msg = nil | |
def refute_in_delta exp, act, delta = 0.001, msg = nil | |
def refute_in_epsilon a, b, epsilon = 0.001, msg = nil | |
def refute_includes collection, obj, msg = nil | |
def refute_instance_of cls, obj, msg = nil | |
def refute_kind_of cls, obj, msg = nil # TODO: merge with instance_of | |
def refute_match exp, act, msg = nil |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
From ccc9b762dc95b3c465fbc5b5466db4152654edb3 Mon Sep 17 00:00:00 2001 | |
From: =?utf-8?q?Tarmo=20T=C3=A4nav?= <[email protected]> | |
Date: Mon, 6 Oct 2008 17:35:21 +0300 | |
Subject: [PATCH] Implement submit_to_remote as a wrapper around a more generic button_to_remote | |
Removed the "return false" from submit_to_remote onclick end as | |
button input elements have no default behavior to cancel. | |
--- | |
.../lib/action_view/helpers/prototype_helper.rb | 18 +++++++----------- | |
actionpack/test/template/prototype_helper_test.rb | 6 +++--- |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/actionpack/test/controller/resources_test.rb b/actionpack/test/controller/resources_test.rb | |
index 1fea82e..7a98102 100644 | |
--- a/actionpack/test/controller/resources_test.rb | |
+++ b/actionpack/test/controller/resources_test.rb | |
@@ -747,6 +747,26 @@ class ResourcesTest < Test::Unit::TestCase | |
end | |
end | |
+ def test_resources_with_actions | |
+ with_routing do |set| |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/railties/helpers/performance_test.rb b/railties/helpers/performance_test.rb | |
index 7c89816..4b60558 100644 | |
--- a/railties/helpers/performance_test.rb | |
+++ b/railties/helpers/performance_test.rb | |
@@ -1,4 +1,5 @@ | |
-require 'performance/test_helper' | |
+require 'test_helper' | |
+require 'performance_test_help' | |
# Profiling results for each test method are written to tmp/performance. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class ApplicationController < ActionController::Base | |
class Redirection < ::ActionController::ActionControllerError | |
attr_reader :arguments | |
def initialize(*arguments) | |
@arguments = arguments | |
end | |
end | |
rescue_from Redirection do |e| | |
redirect_to *e.args |