running sanitize_sql_array outside of a model

扶醉桌前 提交于 2020-01-03 21:25:10

问题


I'm writing a script to build some sql queries and I want to sanitize the query before I execute it. When i call sanitize_sql_array on the array I hit an exception, 'undefined method 'sanitize_sql_array''. How do utilize that active record function without calling from within a model?

来源:https://stackoverflow.com/questions/30808148/running-sanitize-sql-array-outside-of-a-model

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!