Files
sx-fc/app/models/tax_profile.rb
2019-12-20 10:35:31 +06:30

8 lines
260 B
Ruby
Executable File

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