I am using a scope to get an Item for a specific user:
In Item model
belongs_to :user
scope :for_user, lambda { |user| where(:user_id => user) }
User model
has_many :items
Problem
When calling Item.includes(:user).for_user(3) an Array is returned instead of an ActiveRecord relation.
I'd expect it to behave like Item.includes(:user).find_by_user_id(3), which returns a ActiveRecord relation.
Thanks for your help.