I have a model called UserHasMessages where:
belongs_to :message
belongs_to :user
And User.rb model is:
has_many :messages, :through => :user_has_messages
I want to find Users where the associated UserHasMessages has a Message_id of @message.id
I tried something like this (using searchlogic) but it didn't work, and did not know where to begin with meta_where:
User.user_has_message.message_id_is(@message.id).is_sender(false).last
You shouldn't need searchlogic, MetaSearch, nor MetaWhere to make this happen: