Say I have an STI setup as follows:
class User < ActiveRecord::Base scope :busy, -> { where('busy_factor > 1') } end class HeroUser < User scope :busy, -> { where('busy_factor > 5') } end
Thus, hero users have a different threshold for employment.
Now, if I do this, I get warnings:
Creating scope :busy. Overwriting existing method HeroUser.busy.
Everything seems to work correctly, but I wonder if there is a better way to do this.
source share