diff options
author | Nick Kallen <nkallen@nick-kallens-computer-2.local> | 2008-02-11 23:02:33 -0800 |
---|---|---|
committer | Nick Kallen <nkallen@nick-kallens-computer-2.local> | 2008-02-11 23:02:33 -0800 |
commit | 82cd330dbac31d79e23cc06273321ecbac2b9077 (patch) | |
tree | 1c500fc6419e0ab3ea5fdc774c962d9e4120d643 /lib | |
parent | 29d9b8e9b5899a8c52326dfca9343e79ba049d6b (diff) | |
download | rails-82cd330dbac31d79e23cc06273321ecbac2b9077.tar.gz rails-82cd330dbac31d79e23cc06273321ecbac2b9077.tar.bz2 rails-82cd330dbac31d79e23cc06273321ecbac2b9077.zip |
aesthetic considerations
Diffstat (limited to 'lib')
-rw-r--r-- | lib/active_relation/relations/aggregation.rb | 5 | ||||
-rw-r--r-- | lib/active_relation/relations/alias.rb | 4 | ||||
-rw-r--r-- | lib/active_relation/relations/join.rb | 9 | ||||
-rw-r--r-- | lib/active_relation/relations/order.rb | 3 | ||||
-rw-r--r-- | lib/active_relation/relations/projection.rb | 4 | ||||
-rw-r--r-- | lib/active_relation/relations/range.rb | 3 | ||||
-rw-r--r-- | lib/active_relation/relations/rename.rb | 5 | ||||
-rw-r--r-- | lib/active_relation/relations/selection.rb | 4 | ||||
-rw-r--r-- | lib/active_relation/relations/table.rb | 7 |
9 files changed, 29 insertions, 15 deletions
diff --git a/lib/active_relation/relations/aggregation.rb b/lib/active_relation/relations/aggregation.rb index efa6ea260c..692a922ca7 100644 --- a/lib/active_relation/relations/aggregation.rb +++ b/lib/active_relation/relations/aggregation.rb @@ -7,7 +7,10 @@ module ActiveRelation end def ==(other) - self.class == other.class and relation == other.relation and groupings == other.groupings and expressions == other.expressions + self.class == other.class and + relation == other.relation and + groupings == other.groupings and + expressions == other.expressions end def qualify diff --git a/lib/active_relation/relations/alias.rb b/lib/active_relation/relations/alias.rb index 7b03a8c2ab..5b45d9dce4 100644 --- a/lib/active_relation/relations/alias.rb +++ b/lib/active_relation/relations/alias.rb @@ -11,7 +11,9 @@ module ActiveRelation end def ==(other) - self.class == other.class and relation == other.relation and @alias == other.alias + self.class == other.class and + relation == other.relation and + @alias == other.alias end end end
\ No newline at end of file diff --git a/lib/active_relation/relations/join.rb b/lib/active_relation/relations/join.rb index 5b2efe727f..be2e89dd82 100644 --- a/lib/active_relation/relations/join.rb +++ b/lib/active_relation/relations/join.rb @@ -8,9 +8,12 @@ module ActiveRelation def ==(other) self.class == other.class and - predicates == other.predicates and - ((relation1 == other.relation1 and relation2 == other.relation2) or - (relation2 == other.relation1 and relation1 == other.relation2)) + predicates == other.predicates and ( + (relation1 == other.relation1 and + relation2 == other.relation2) or + (relation2 == other.relation1 and + relation1 == other.relation2) + ) end def qualify diff --git a/lib/active_relation/relations/order.rb b/lib/active_relation/relations/order.rb index 688207f7a9..a23da967fd 100644 --- a/lib/active_relation/relations/order.rb +++ b/lib/active_relation/relations/order.rb @@ -7,7 +7,8 @@ module ActiveRelation end def ==(other) - relation == other.relation and orders == other.orders + relation == other.relation and + orders == other.orders end def qualify diff --git a/lib/active_relation/relations/projection.rb b/lib/active_relation/relations/projection.rb index 78698603f0..9e0725f6c5 100644 --- a/lib/active_relation/relations/projection.rb +++ b/lib/active_relation/relations/projection.rb @@ -8,7 +8,9 @@ module ActiveRelation end def ==(other) - self.class == other.class and relation == other.relation and projections == other.projections + self.class == other.class and + relation == other.relation and + projections == other.projections end def qualify diff --git a/lib/active_relation/relations/range.rb b/lib/active_relation/relations/range.rb index 83af03fc0e..7f120ab9e5 100644 --- a/lib/active_relation/relations/range.rb +++ b/lib/active_relation/relations/range.rb @@ -7,7 +7,8 @@ module ActiveRelation end def ==(other) - relation == other.relation and range == other.range + relation == other.relation and + range == other.range end def limit diff --git a/lib/active_relation/relations/rename.rb b/lib/active_relation/relations/rename.rb index c41cd1bdc5..83ab41df70 100644 --- a/lib/active_relation/relations/rename.rb +++ b/lib/active_relation/relations/rename.rb @@ -8,7 +8,10 @@ module ActiveRelation end def ==(other) - self.class == other.class and relation == other.relation and attribute == other.attribute and pseudonym == other.pseudonym + self.class == other.class and + relation == other.relation and + attribute == other.attribute and + pseudonym == other.pseudonym end def qualify diff --git a/lib/active_relation/relations/selection.rb b/lib/active_relation/relations/selection.rb index 5f1726d381..98f56b0cbd 100644 --- a/lib/active_relation/relations/selection.rb +++ b/lib/active_relation/relations/selection.rb @@ -8,7 +8,9 @@ module ActiveRelation end def ==(other) - self.class == other.class and relation == other.relation and predicate == other.predicate + self.class == other.class and + relation == other.relation and + predicate == other.predicate end def qualify diff --git a/lib/active_relation/relations/table.rb b/lib/active_relation/relations/table.rb index d6ab45dcea..c8ccb22fdd 100644 --- a/lib/active_relation/relations/table.rb +++ b/lib/active_relation/relations/table.rb @@ -19,11 +19,8 @@ module ActiveRelation def prefix_for(attribute) name end - - def aliased_prefix_for(attribute) - name - end - + alias_method :aliased_prefix_for, :prefix_for + protected def table_sql "#{quote_table_name(name)}" |