模式 class Person < ActiveRecord::Base
attr_accessible :alignment, :description, :first_name, :last_name
has_many :roles #table roles with active as one of the field with value equal t or f (b
尝试更改搜索以从邮政编码中提取位置而不是location_id后,结果返回为空。 我以前的代码使用了位置ID。有人知道如何让它与邮政编码一起工作吗?我在用户表中有zip_code列,在地址表中有zipcode列。 location_id被用于位置表中每一行的自动增量。 当前代码:与LOCATION_ID工作 def index
if location = Location.find_by
rake ts:重建执行没有错误,但我无法获得索引页来显示我有这个错误: sphinxql: syntax error, unexpected AND, expecting CONST_INT (or 3 other tokens) near 'AND `broadcast_date` BETWEEN 0 AND 0 AND `sphinx_deleted` = 0 LIMIT 0, 20; SH