instance method
with
Ruby on Rails edge
Since edgeSignature
with(...)
Add a Common Table Expression (CTE) that you can then reference within another SELECT statement.
See ActiveRecord::QueryMethods#with for more information.
When given a block, and the Object#with core extension is loaded, this delegates to it instead, temporarily setting the given attributes on the class for the duration of the block and restoring them afterwards.
Parameters
-
...req
Source
# File activerecord/lib/active_record/querying.rb, line 33
def with(...)
return super if block_given? && defined?(super)
all.with(...)
end
Defined in activerecord/lib/active_record/querying.rb line 33
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveRecord::Querying