Before a few renames
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
module EmployerAutomation
|
||||
extend ActiveSupport::Concern
|
||||
|
||||
# included do
|
||||
# # Code in this block becomes instance methods or class macros (like scopes, validations, associations) in the including class.
|
||||
# scope :visible, -> { where(visible: true) }
|
||||
# scope :invisible, -> { where(visible: false) }
|
||||
# validates :status, inclusion: { in: %w(visible invisible), message: "%{value} is not a valid status" }
|
||||
# end
|
||||
|
||||
# class_methods do
|
||||
# # Methods in this block become class methods of the including class.
|
||||
# def count_all_visible
|
||||
# visible.count
|
||||
# end
|
||||
# end
|
||||
|
||||
# Any other methods defined here become instance methods automatically.
|
||||
def up_to_date?
|
||||
self.pl_plan_key.present? &&
|
||||
self.company_pb_entity_key.present? &&
|
||||
self.plan_id.present? &&
|
||||
self.group_number.present? &&
|
||||
self.effect_date.present?
|
||||
end
|
||||
|
||||
def sync_with_vhcs
|
||||
sql_query = "SELECT PLPlanKey, PlanId, ShortDesc FROM PLPlanHeader WHERE ActiveInactive = 'Active' And PLPlanKey = 57"
|
||||
plan_header = VhcsRecord.connection.select_all(sql_query).first
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user