Feature: API for updating account settings (#645)
* Feature: API for updating account settings - API to update account locale - API to update account name - API to show account info
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
# Table name: accounts
|
||||
#
|
||||
# id :integer not null, primary key
|
||||
# locale :integer default("English")
|
||||
# name :string not null
|
||||
# created_at :datetime not null
|
||||
# updated_at :datetime not null
|
||||
@@ -30,6 +31,8 @@ class Account < ApplicationRecord
|
||||
has_one :subscription, dependent: :destroy
|
||||
has_many :notification_settings, dependent: :destroy
|
||||
|
||||
enum locale: LANGUAGES_CONFIG.map { |key, val| [val[:iso_639_3_code], key] }.to_h
|
||||
|
||||
after_create :create_subscription
|
||||
after_create :notify_creation
|
||||
after_destroy :notify_deletion
|
||||
|
||||
Reference in New Issue
Block a user