Dynamically handle query_type #4528
                  
                    
                      urchymanny
                    
                  
                
                  started this conversation in
                Ideas
              
            Replies: 0 comments
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment
  
        
    
Uh oh!
There was an error while loading. Please reload this page.
-
Hi everyone, I think it would be an excellent idea to make the query types be defined dynamically from the existing models. currently, the way to handle query types is cumbersome. Example:
I wrote a snippet that makes it possible to do this dynamically from an array of models
This solves the problem of having to include
field :name, NameType, null: falseevery time a new model is madeBeta Was this translation helpful? Give feedback.
All reactions