Skip to content

Instantly share code, notes, and snippets.

@danmcclain
Created September 13, 2012 17:15
Show Gist options
  • Select an option

  • Save danmcclain/3715912 to your computer and use it in GitHub Desktop.

Select an option

Save danmcclain/3715912 to your computer and use it in GitHub Desktop.
ARel issue
irb(main):001:0> a = Condition.arel_table
=> #<Arel::Table:0x007fefbc868e28 @name="conditions", @engine=ActiveRecord::Base, @columns=nil, @aliases=[], @table_alias=nil, @primary_key=nil>
irb(main):002:0> Arel::Nodes::Equality.new('1', Arel::Nodes::NamedFunction.new('ANY', a[:name])).to_sql
=> "'1' = ANY(\"conditions\", 'name')"
# Named function should produce ANY(\"conditions\".\"name\")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment