【发布时间】:2016-07-09 02:57:58
【问题描述】:
我有一个字段作为 json 列,我必须搜索该列中的所有电话值,我已经搜索过它,但我没有使用 ransack 找到任何文档。是否可以使用 ransaack 搜索 json 列? 我已经使用 ransack 搜索其他字段,所以我必须使用 ransack 或可以结合这两个结果的东西
我的 json 列是这样的
{"phone1"=>"", "relationship_type1"=>"", "relationship_name1"=>"", "phone2"=>"", "relationship_type2"=>"", "relationship_name2"=>"", "phone3"=>"", "relationship_type3"=>"", "relationship_name3"=>"", "phone4"=>"", "relationship_type4"=>"", "relationship_name4"=>""}
phone1,phone2,3,4 应该是可搜索的。
【问题讨论】:
标签: ruby ruby-on-rails-3 ruby-on-rails-4 ransack