2016-04-25 20 views
-2

会場カテゴリテーブルに参加してプロパティをリストアップする必要があります解決方法アクティブレコードエラー

これは私のアクティブレコードです。私は私のSQLエラー「オペランドが1列(複数可)を含める必要がありますを持っていますこれをしようとしたとき

答えて

0

はこれを試してみてください @properties = Property.where(:status=>'1') @properties = @properties.joins(:venue_categories).where("venue_categories.id=?", params[:venue_categories]).all if params[:venue_categories].present?

すべてのヘルプはappreciatableです:それは正常に動作している

@properties = Property.where(:status=>'1') 
@properties = @properties.joins(:venue_categories).where(venue_categories: {id: params[:venue_categories]}) if params[:venue_categories].present? 
+0

:) どうもありがとう – SreRoR

関連する問題