Update awakening.rb
- Removes explicitly defined associations and adds ActiveRecord associations instead
This commit is contained in:
parent
9fdce28253
commit
d7f11e3ca5
1 changed files with 2 additions and 7 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue