mirror of
https://github.com/maybe-finance/maybe.git
synced 2025-08-05 13:35:21 +02:00
Allow users to set preferred locale in settings and provide basic date and time localization support (#1226)
* Add basic date and time localization * Normalize translations * Localize transaction dates * Removed unsupported Rails locales
This commit is contained in:
parent
7fabca4679
commit
ab40289eb4
130 changed files with 25190 additions and 10 deletions
|
@ -12,6 +12,8 @@ class Family < ApplicationRecord
|
|||
has_many :merchants, dependent: :destroy
|
||||
has_many :issues, through: :accounts
|
||||
|
||||
validates :locale, inclusion: { in: I18n.available_locales.map(&:to_s) }
|
||||
|
||||
def snapshot(period = Period.all)
|
||||
query = accounts.active.joins(:balances)
|
||||
.where("account_balances.currency = ?", self.currency)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue