Update awakening.rb

- Removes explicitly defined associations and adds ActiveRecord associations instead
This commit is contained in:
Justin Edmund 2025-02-09 18:34:00 -08:00
parent 9fdce28253
commit d7f11e3ca5

View file

@ -1,13 +1,8 @@
# frozen_string_literal: true
class Awakening < ApplicationRecord
def weapon_awakenings
WeaponAwakening.where(awakening_id: id)
end
def weapons
weapon_awakenings.map(&:weapon)
end
has_many :weapon_awakenings, foreign_key: :awakening_id
has_many :weapons, through: :weapon_awakenings
def awakening
AwakeningBlueprint