aboutsummaryrefslogtreecommitdiffstats
path: root/lib/arel/algebra/relations/relation.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/arel/algebra/relations/relation.rb')
-rw-r--r--lib/arel/algebra/relations/relation.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/arel/algebra/relations/relation.rb b/lib/arel/algebra/relations/relation.rb
index 5403e40fae..2ce3fdcce8 100644
--- a/lib/arel/algebra/relations/relation.rb
+++ b/lib/arel/algebra/relations/relation.rb
@@ -43,7 +43,7 @@ module Arel
join(other_relation, OuterJoin)
end
- [:where, :project, :order, :take, :skip, :group].each do |operation_name|
+ [:where, :project, :order, :take, :skip, :group, :from].each do |operation_name|
class_eval <<-OPERATION, __FILE__, __LINE__
def #{operation_name}(*arguments, &block)
arguments.all?(&:blank?) && !block_given?? self : #{operation_name.to_s.classify}.new(self, *arguments, &block)
@@ -130,6 +130,7 @@ module Arel
def joins(formatter = nil); nil end # FIXME
def taken; nil end
def skipped; nil end
+ def sources; [] end
end
include DefaultOperations
end