mirror of
https://github.com/docusealco/docuseal
synced 2026-11-06 06:52:33 -05:00
adjust templates, add timezone and locale
This commit is contained in:
1 parent
d0c7d449d5
commit
c904d51302
47 files changed
+331
-171
No files matched your search
@@ -5,7 +5,9 @@
|
||||
# Table name: accounts
|
||||
#
|
||||
# id :bigint not null, primary key
|
||||
# locale :string not null
|
||||
# name :string not null
|
||||
# timezone :string not null
|
||||
# created_at :datetime not null
|
||||
# updated_at :datetime not null
|
||||
#
|
||||
@@ -15,4 +17,7 @@ class Account < ApplicationRecord
|
||||
has_many :templates, dependent: :destroy
|
||||
has_many :active_users, -> { active }, dependent: :destroy,
|
||||
inverse_of: :account, class_name: 'User'
|
||||
|
||||
attribute :timezone, :string, default: 'UTC'
|
||||
attribute :locale, :string, default: 'en-US'
|
||||
end
|
||||
@@ -50,4 +50,8 @@ class Submitter < ApplicationRecord
|
||||
'awaiting'
|
||||
end
|
||||
end
|
||||
|
||||
def status_event_at
|
||||
completed_at || opened_at || sent_at || created_at
|
||||
end
|
||||
end
|
||||
@@ -52,8 +52,6 @@ class User < ApplicationRecord
|
||||
|
||||
scope :active, -> { where(deleted_at: nil) }
|
||||
|
||||
accepts_nested_attributes_for :account, update_only: true
|
||||
|
||||
def active_for_authentication?
|
||||
!deleted_at?
|
||||
end
|
||||
|
||||
Reference in new issue
Block a user