Rails: Using service class methods in a scope query
问题 I have a user model. I'm trying to set my user index view to show only those users who have completed an onboarding process. My approach to doing that is: index: <% Users.onboarded.each do |user| %> In my user.rb, I tried to define a scope, for onboarding, as: scope :onboarded, -> { where (:user_is_matchable?) } I have a method in my organisation service class which has: class UserOrganisationMapperService attr_accessor :user private def user_is_matchable? profile.present? && matching