Skip to content

Instantly share code, notes, and snippets.

View spastorino's full-sized avatar

Santiago Pastorino spastorino

View GitHub Profile
require 'test_helper'
class ExceptionController < ActionController::Base
respond_to :html, :xml, :json
include Exceptron::Helpers
def not_found
respond_with exception
end
diff --git a/spec/resolver/basic_spec.rb b/spec/resolver/basic_spec.rb
index 177a7b0..f54431f 100644
--- a/spec/resolver/basic_spec.rb
+++ b/spec/resolver/basic_spec.rb
@@ -17,4 +17,11 @@ describe "Resolving" do
should_resolve_as %w(actionpack-2.3.5 activesupport-2.3.5 rack-1.0)
end
-end
\ No newline at end of file
diff --git a/activerecord/lib/active_record/base.rb b/activerecord/lib/active_record/base.rb
index 6076aaf..b859650 100644
--- a/activerecord/lib/active_record/base.rb
+++ b/activerecord/lib/active_record/base.rb
@@ -1365,7 +1365,7 @@ MSG
def initialize(attributes = nil)
@attributes = attributes_from_column_definition
@attributes_cache = {}
- @new_record = true
+ @persisted = false
diff --git a/activerecord/lib/active_record/base.rb b/activerecord/lib/active_record/base.rb
index e29c6c2..d65dc6b 100644
--- a/activerecord/lib/active_record/base.rb
+++ b/activerecord/lib/active_record/base.rb
@@ -1610,9 +1610,9 @@ MSG
# Returns true if the +comparison_object+ is the same object, or is of the same type and has the same id.
def ==(comparison_object)
comparison_object.equal?(self) ||
- persisted? &&
- (comparison_object.instance_of?(self.class) &&
diff --git a/activerecord/lib/active_record/nested_attributes.rb b/activerecord/lib/active_record/nested_attributes.rb
index 65434fb..829299a 100644
--- a/activerecord/lib/active_record/nested_attributes.rb
+++ b/activerecord/lib/active_record/nested_attributes.rb
@@ -224,9 +224,9 @@ module ActiveRecord
# # creates avatar_attributes= and posts_attributes=
# accepts_nested_attributes_for :avatar, :posts, :allow_destroy => true
def accepts_nested_attributes_for(*attr_names)
- options = { :allow_destroy => false, :update_only => false }
+ options = { :allow_destroy => false, :update_only => false, :partial_updates => false }
require 'fiber'
module Eigenclass
def eigenclass
class << self; self end
end
module_function :eigenclass
public :eigenclass
end
diff --git a/actionpack/lib/action_view/helpers/number_helper.rb b/actionpack/lib/action_view/helpers/number_helper.rb
index d1c8064..5250807 100644
--- a/actionpack/lib/action_view/helpers/number_helper.rb
+++ b/actionpack/lib/action_view/helpers/number_helper.rb
@@ -51,14 +51,9 @@ module ActionView
begin
Float(number)
- is_number_html_safe = true
rescue ArgumentError, TypeError
➜ rails git:(spastorino-master) rake
(in /Users/santiago/WyeWorks/Projs/rails)
(in /Users/santiago/WyeWorks/Projs/rails/activesupport)
/Users/santiago/.rvm/rubies/rbx-head/bin/rbx -w -I"lib:test" "/Users/santiago/.rvm/gems/rbx-head/gems/rake-0.8.7/lib/rake/rake_test_loader.rb" "test/benchmarkable_test.rb" "test/buffered_logger_test.rb" "test/caching_test.rb" "test/callback_inheritance_test.rb" "test/callbacks_test.rb" "test/clean_backtrace_test.rb" "test/clean_logger_test.rb" "test/concern_test.rb" "test/configurable_test.rb" "test/dependencies_test.rb" "test/deprecation_test.rb" "test/descendants_tracker_test.rb" "test/file_update_checker_test.rb" "test/flush_cache_on_private_memoization_test.rb" "test/gzip_test.rb" "test/i18n_test.rb" "test/inflector_test.rb" "test/isolation_test.rb" "test/lazy_load_hooks_test.rb" "test/load_paths_test.rb" "test/log_subscriber_test.rb" "test/memoizable_test.rb" "test/message_encryptor_test.rb" "test/message_verifier_test.rb" "test/multibyte_chars_test.rb" "test/multib
➜ rails git:(spastorino-master) bundle update
...
Installing mysql (2.8.1) with native extensions An exception occurred running /Users/santiago/.rvm/gems/rbx-head@global/bin/bundle
ERROR: Failed to build gem native extension.
/Users/santiago/.rvm/rubies/rbx-head/bin/rbx extconf.rb
checking for mysql_ssl_set()... yes
checking for rb_str_set_len()... no
checking for rb_thread_start_timer()... no
checking for mysql.h...
➜ rails git:(master) ✗ bundle update
Updating git://github.com/rails/arel.git
Updating git://github.com/rack/rack.git
Fetching source index for http://rubygems.org/
/Users/santiago/.rvm/gems/ruby-1.8.7-p302@global/gems/bundler-1.0.2/lib/bundler/resolver.rb:235:in `resolve': undefined method `name' for nil:NilClass (NoMethodError)
from /Users/santiago/.rvm/gems/ruby-1.8.7-p302@global/gems/bundler-1.0.2/lib/bundler/resolver.rb:216:in `resolve'
from /Users/santiago/.rvm/gems/ruby-1.8.7-p302@global/gems/bundler-1.0.2/lib/bundler/resolver.rb:344:in `resolve_requirement'
from /Users/santiago/.rvm/gems/ruby-1.8.7-p302@global/gems/bundler-1.0.2/lib/bundler/resolver.rb:343:in `catch'
from /Users/santiago/.rvm/gems/ruby-1.8.7-p302@global/gems/bundler-1.0.2/lib/bundler/resolver.rb:343:in `resolve_requirement'
from /Users/santiago/.rvm/gems/ruby-1.8.7-p302@global/gems/bundler-1.0.2/lib/bundler/resolver.rb:295:in `resolve'