ruby on rails - Is it possible to generate SQL `OR` clauses by using scope methods? -
I am using ruby on Ruby 3.2.2 and white gem I would like to know that if used in a way If there is a way to generate SQL queries from the SQL states related to those scope methods, then Is it possible to generate clauses (using or not using silk gem) with the methods of sculpture We are discussing this and the original answer does not seem like this. Not least with scope; But if you change the scope to ciphers, then you can. or can be generated. That's it, I have:
class articles & lt; ActiveRecord :: base df self.scope_method_1 ... # scope_method_1 End of SQL statuses df self.scope_method_2 ... # scope_method_2 Situations of SQL positions self.scope_method_combination # # I'm looking for some # # where {scope_method_1 | Scope_method_2} # Note: '|' This means that the SQL 'or' Claus Scalcel context # # is in place so that the following SQL query can be prepared: # # Select from the articles, where scope_man_1_1 SQL conditions & gt; Or & lt; Scope_method_2 sql positions & gt;
or ?
Comments
Post a Comment