Let\'s say we have the following:
irb> Post.where(:hidden => true).to_sql => \"SELECT `posts`.* FROM `posts` WHERE posts.hidden = 1\"
With a different syntax, yes. Example:
posts = Post.scoped.table # or Arel::Table.new("posts") posts.where(posts[:hidden].eq(true).not).to_sql # => SELECT FROM `posts` WHERE NOT ((`posts`.`hidden` = 1))