我如何将它从 searchlogic 转换为 Rails 3 中的 metwhere ?
我在 searchlogic 中有以下内容:
Todo.contact_id_is(self.id).ascend_by_original_date.done_date_not_null.first
既然我在 Rails 3 中,我将如何在 metawhere 中执行此操作?特别是 not_null 和排序?
你好,我有点困惑。当我查看在meta_search(而不是metawhere)中找到的命名范围时...这就是我正在寻找的更多内容...现在metasearch正在被ransack取代...
进行链式搜索的方法是什么在我的模型上使用 sql,searchlogic 让它变得如此简单?
...好吧...现在看来 ransack 是针对表单的,但是对模型的查询却是 squeel?检查一下....
I had the following in searchlogic:
Todo.contact_id_is(self.id).ascend_by_original_date.done_date_not_null.first
How would I do this in metawhere now that I am in Rails 3? In particular the not_null and the sorting?
Hello, I'm a little confused. When I look at the named scopes found in meta_search (instead of metawhere)...that's more of what I'm looking for...and now metasearch is being replaced with ransack....
What is the way to do chained searches with sql on my models in the way searchlogic made it so drop-dead easy?
...okay...now it looks like ransack is for forms, but queries on models is squeel? Checking that out....
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
似乎 metawhere 没有
!=
运算符,它是在sqeel
中添加的,所以这里是一个可能的解决方法It seems that metawhere doesn't have
!=
operator it was added insqeel
so here is a possible workaround