diff options
author | multiple creatures <dev@multiple-creature.party> | 2019-07-31 00:09:57 -0500 |
---|---|---|
committer | multiple creatures <dev@multiple-creature.party> | 2019-07-31 00:09:57 -0500 |
commit | 9e9a593f5a8e8803e56a8d8398a90759a413713b (patch) | |
tree | b2c75624ffccc9c1a75a48ece71435c254e77f22 | |
parent | a5ce8eddb414a1f77136a30598744cb99846182f (diff) |
make `updated_at` attribute accessible in the instance model
-rw-r--r-- | app/models/instance.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/app/models/instance.rb b/app/models/instance.rb index 7bf000d40..ad885dde6 100644 --- a/app/models/instance.rb +++ b/app/models/instance.rb @@ -3,12 +3,13 @@ class Instance include ActiveModel::Model - attr_accessor :domain, :accounts_count, :domain_block + attr_accessor :domain, :accounts_count, :domain_block, :updated_at def initialize(resource) @domain = resource.domain @accounts_count = resource.is_a?(DomainBlock) ? nil : resource.accounts_count @domain_block = resource.is_a?(DomainBlock) ? resource : DomainBlock.find_by(domain: domain) + @updated_at = resource.updated_at end def cached_sample_accounts |