Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Refactor to use each_key, remove extra spaces

  • Loading branch information...
commit 2cb576ef36fdf14c4d4e1b8e66d930af7ad35aeb 1 parent 439ac72
@carlosantoniodasilva carlosantoniodasilva authored
View
2  activerecord/CHANGELOG.md
@@ -601,7 +601,7 @@
*Matt Jones*
-* Accept belongs_to (including polymorphic) association keys in queries.
+* Accept `belongs_to` (including polymorphic) association keys in queries.
The following queries are now equivalent:
View
2  activerecord/lib/active_record/associations/join_dependency.rb
@@ -68,7 +68,7 @@ def remove_duplicate_results!(base, records, associations)
remove_duplicate_results!(base, records, association)
end
when Hash
- associations.keys.each do |name|
+ associations.each_key do |name|
reflection = base.reflections[name]
remove_uniq_by_reflection(reflection, records)
View
4 activerecord/lib/active_record/persistence.rb
@@ -220,7 +220,7 @@ def update(attributes)
save
end
end
-
+
alias update_attributes update
# Updates its receiver just like +update+ but calls <tt>save!</tt> instead
@@ -233,7 +233,7 @@ def update!(attributes)
save!
end
end
-
+
alias update_attributes! update!
# Equivalent to <code>update_columns(name => value)</code>.
View
1  activerecord/lib/active_record/querying.rb
@@ -1,4 +1,3 @@
-
module ActiveRecord
module Querying
delegate :find, :take, :take!, :first, :first!, :last, :last!, :exists?, :any?, :many?, :to => :all
View
1  activerecord/lib/active_record/reflection.rb
@@ -1,4 +1,3 @@
-
module ActiveRecord
# = Active Record Reflection
module Reflection # :nodoc:
View
2  activerecord/lib/active_record/scoping.rb
@@ -1,4 +1,3 @@
-
module ActiveRecord
module Scoping
extend ActiveSupport::Concern
@@ -25,6 +24,5 @@ def populate_with_current_scope_attributes
send("#{att}=", value) if respond_to?("#{att}=")
end
end
-
end
end
View
4 activerecord/lib/active_record/scoping/default.rb
@@ -1,4 +1,3 @@
-
module ActiveRecord
module Scoping
module Default
@@ -99,7 +98,7 @@ def default_scope(scope = nil)
)
end
- self.default_scopes = default_scopes + [scope]
+ self.default_scopes += [scope]
end
def build_default_scope # :nodoc:
@@ -140,7 +139,6 @@ def evaluate_default_scope # :nodoc:
self.ignore_default_scope = false
end
end
-
end
end
end
Please sign in to comment.
Something went wrong with that request. Please try again.