aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord
diff options
context:
space:
mode:
authorRafael Mendonça França <rafaelmfranca@gmail.com>2013-01-22 00:30:45 -0200
committerRafael Mendonça França <rafaelmfranca@gmail.com>2013-01-22 00:30:45 -0200
commit4de3b3dac5bb66e1566ff89f1c2632bfbb25f043 (patch)
tree98fa40a0a890c5cff16cf1e76ae0d98be0ccc1ae /activerecord
parent19bd2f227929c6ad3c1ea6d675d91f2165dec40b (diff)
downloadrails-4de3b3dac5bb66e1566ff89f1c2632bfbb25f043.tar.gz
rails-4de3b3dac5bb66e1566ff89f1c2632bfbb25f043.tar.bz2
rails-4de3b3dac5bb66e1566ff89f1c2632bfbb25f043.zip
Whitespaces :scissors:
[ci skip]
Diffstat (limited to 'activerecord')
-rw-r--r--activerecord/lib/active_record/core.rb24
-rw-r--r--activerecord/test/cases/connection_pool_test.rb11
2 files changed, 16 insertions, 19 deletions
diff --git a/activerecord/lib/active_record/core.rb b/activerecord/lib/active_record/core.rb
index 812f1ce5c5..63a1197a56 100644
--- a/activerecord/lib/active_record/core.rb
+++ b/activerecord/lib/active_record/core.rb
@@ -365,18 +365,18 @@ module ActiveRecord
pk = self.class.primary_key
@attributes[pk] = nil unless @attributes.key?(pk)
- @aggregation_cache = {}
- @association_cache = {}
- @attributes_cache = {}
- @previously_changed = {}
- @changed_attributes = {}
- @readonly = false
- @destroyed = false
- @marked_for_destruction = false
- @new_record = true
- @txn = nil
- @_start_transaction_state = {}
- @transaction = nil
+ @aggregation_cache = {}
+ @association_cache = {}
+ @attributes_cache = {}
+ @previously_changed = {}
+ @changed_attributes = {}
+ @readonly = false
+ @destroyed = false
+ @marked_for_destruction = false
+ @new_record = true
+ @txn = nil
+ @_start_transaction_state = {}
+ @transaction = nil
end
end
end
diff --git a/activerecord/test/cases/connection_pool_test.rb b/activerecord/test/cases/connection_pool_test.rb
index ea344e992b..23e64bee7e 100644
--- a/activerecord/test/cases/connection_pool_test.rb
+++ b/activerecord/test/cases/connection_pool_test.rb
@@ -328,19 +328,16 @@ module ActiveRecord
assert @pool.connection.visitor.is_a?(Arel::Visitors::ToSql)
end
-
- #make sure exceptions are thrown when establish_connection
- #is called with a anonymous class
+ # make sure exceptions are thrown when establish_connection
+ # is called with a anonymous class
def test_anonymous_class_exception
anonymous = Class.new(ActiveRecord::Base)
handler = ActiveRecord::Base.connection_handler
-
- assert_raises(RuntimeError){
+
+ assert_raises(RuntimeError) {
handler.establish_connection anonymous, nil
}
end
-
-
end
end
end