aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/models
diff options
context:
space:
mode:
Diffstat (limited to 'activerecord/test/models')
-rw-r--r--activerecord/test/models/club.rb6
-rw-r--r--activerecord/test/models/company.rb22
-rw-r--r--activerecord/test/models/company_in_module.rb6
-rw-r--r--activerecord/test/models/engine.rb1
-rw-r--r--activerecord/test/models/eye.rb2
-rw-r--r--activerecord/test/models/mentor.rb2
-rw-r--r--activerecord/test/models/person.rb12
-rw-r--r--activerecord/test/models/vehicle.rb2
8 files changed, 26 insertions, 27 deletions
diff --git a/activerecord/test/models/club.rb b/activerecord/test/models/club.rb
index b2986a8c58..49d7b24a3b 100644
--- a/activerecord/test/models/club.rb
+++ b/activerecord/test/models/club.rb
@@ -10,9 +10,9 @@ class Club < ActiveRecord::Base
private
- def private_method
- "I'm sorry sir, this is a *private* club, not a *pirate* club"
- end
+ def private_method
+ "I'm sorry sir, this is a *private* club, not a *pirate* club"
+ end
end
class SuperClub < ActiveRecord::Base
diff --git a/activerecord/test/models/company.rb b/activerecord/test/models/company.rb
index 921cf10f30..025630087c 100644
--- a/activerecord/test/models/company.rb
+++ b/activerecord/test/models/company.rb
@@ -22,12 +22,12 @@ class Company < AbstractCompany
private
- def private_method
- "I am Jack's innermost fears and aspirations"
- end
+ def private_method
+ "I am Jack's innermost fears and aspirations"
+ end
- class SpecialCo < Company
- end
+ class SpecialCo < Company
+ end
end
module Namespaced
@@ -218,13 +218,13 @@ class Account < ActiveRecord::Base
protected
- def check_empty_credit_limit
- errors.add("credit_limit", :blank) if credit_limit.blank?
- end
+ def check_empty_credit_limit
+ errors.add("credit_limit", :blank) if credit_limit.blank?
+ end
private
- def private_method
- "Sir, yes sir!"
- end
+ def private_method
+ "Sir, yes sir!"
+ end
end
diff --git a/activerecord/test/models/company_in_module.rb b/activerecord/test/models/company_in_module.rb
index e035a80ab8..682f99e365 100644
--- a/activerecord/test/models/company_in_module.rb
+++ b/activerecord/test/models/company_in_module.rb
@@ -90,9 +90,9 @@ module MyApplication
protected
- def check_empty_credit_limit
- errors.add("credit_card", :blank) if credit_card.blank?
- end
+ def check_empty_credit_limit
+ errors.add("credit_card", :blank) if credit_card.blank?
+ end
end
end
end
diff --git a/activerecord/test/models/engine.rb b/activerecord/test/models/engine.rb
index 50c6717037..eada171f6a 100644
--- a/activerecord/test/models/engine.rb
+++ b/activerecord/test/models/engine.rb
@@ -1,4 +1,3 @@
class Engine < ActiveRecord::Base
belongs_to :my_car, class_name: "Car", foreign_key: "car_id", counter_cache: :engines_count
end
-
diff --git a/activerecord/test/models/eye.rb b/activerecord/test/models/eye.rb
index dc8ae2b3f6..ab3b3eacf3 100644
--- a/activerecord/test/models/eye.rb
+++ b/activerecord/test/models/eye.rb
@@ -15,7 +15,7 @@ class Eye < ActiveRecord::Base
after_create :trace_after_create2
after_update :trace_after_update2
after_save :trace_after_save2
-
+
def trace_after_create
(@after_create_callbacks_stack ||= []) << !iris.persisted?
end
diff --git a/activerecord/test/models/mentor.rb b/activerecord/test/models/mentor.rb
index 11f1e4bff8..66504b4e91 100644
--- a/activerecord/test/models/mentor.rb
+++ b/activerecord/test/models/mentor.rb
@@ -1,3 +1,3 @@
class Mentor < ActiveRecord::Base
has_many :developers
-end \ No newline at end of file
+end
diff --git a/activerecord/test/models/person.rb b/activerecord/test/models/person.rb
index ea215eeb81..eb117f92e1 100644
--- a/activerecord/test/models/person.rb
+++ b/activerecord/test/models/person.rb
@@ -96,13 +96,13 @@ class RichPerson < ActiveRecord::Base
private
- def run_before_create
- self.first_name = first_name.to_s + "run_before_create"
- end
+ def run_before_create
+ self.first_name = first_name.to_s + "run_before_create"
+ end
- def run_before_validation
- self.first_name = first_name.to_s + "run_before_validation"
- end
+ def run_before_validation
+ self.first_name = first_name.to_s + "run_before_validation"
+ end
end
class NestedPerson < ActiveRecord::Base
diff --git a/activerecord/test/models/vehicle.rb b/activerecord/test/models/vehicle.rb
index ef26170f1f..855bc4e325 100644
--- a/activerecord/test/models/vehicle.rb
+++ b/activerecord/test/models/vehicle.rb
@@ -4,4 +4,4 @@ class Vehicle < ActiveRecord::Base
end
class Bus < Vehicle
-end \ No newline at end of file
+end