class TaxProfile < ApplicationRecord has_one :lookup, -> { where(lookup_type: 'tax_profiles') }, foreign_key: "value", primary_key: "group_type" default_scope { order('order_by asc') } # validations validates_presence_of :name, :rate, :group_type end