Skip to content

Commit

Permalink
Remove convenience class alias
Browse files Browse the repository at this point in the history
This convenience class is only used twice in Arel. We can easily write
it out instead.
  • Loading branch information
eileencodes committed Mar 13, 2020
1 parent 0c715e5 commit 166aee8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
5 changes: 1 addition & 4 deletions activerecord/lib/arel.rb
Expand Up @@ -43,7 +43,7 @@ def self.star # :nodoc:
end

def self.arel_node?(value) # :nodoc:
value.is_a?(Arel::Node) || value.is_a?(Arel::Attribute) || value.is_a?(Arel::Nodes::SqlLiteral)
value.is_a?(Arel::Nodes::Node) || value.is_a?(Arel::Attribute) || value.is_a?(Arel::Nodes::SqlLiteral)
end

def self.fetch_attribute(value, &block) # :nodoc:
Expand All @@ -59,7 +59,4 @@ def self.fetch_attribute(value, &block) # :nodoc:
fetch_attribute(value.expr, &block)
end
end

## Convenience Alias
Node = Arel::Nodes::Node # :nodoc:
end
2 changes: 1 addition & 1 deletion activerecord/test/cases/arel/nodes/node_test.rb
Expand Up @@ -5,7 +5,7 @@
module Arel
class TestNode < Arel::Test
def test_includes_factory_methods
assert Node.new.respond_to?(:create_join)
assert Arel::Nodes::Node.new.respond_to?(:create_join)
end

def test_all_nodes_are_nodes
Expand Down

0 comments on commit 166aee8

Please sign in to comment.