mirror of
https://0xacab.org/sutty/sutty
synced 2024-11-22 15:46:21 +00:00
al eliminar un sitio eliminar otros datos relacionados
This commit is contained in:
parent
9b3eb7a804
commit
cc0a9ef3d3
2 changed files with 4 additions and 4 deletions
|
@ -9,7 +9,7 @@ require 'open3'
|
|||
# :attributes`.
|
||||
class Deploy < ApplicationRecord
|
||||
belongs_to :site
|
||||
has_many :build_stats
|
||||
has_many :build_stats, dependent: :destroy
|
||||
|
||||
def deploy
|
||||
raise NotImplementedError
|
||||
|
|
|
@ -36,10 +36,10 @@ class Site < ApplicationRecord
|
|||
belongs_to :design
|
||||
belongs_to :licencia
|
||||
|
||||
has_many :log_entries
|
||||
has_many :deploys
|
||||
has_many :log_entries, dependent: :destroy
|
||||
has_many :deploys, dependent: :destroy
|
||||
has_many :build_stats, through: :deploys
|
||||
has_many :roles
|
||||
has_many :roles, dependent: :destroy
|
||||
has_many :usuaries, -> { where('roles.rol = ?', 'usuarie') },
|
||||
through: :roles
|
||||
has_many :invitades, -> { where('roles.rol = ?', 'invitade') },
|
||||
|
|
Loading…
Reference in a new issue