mirror of
https://github.com/we-promise/sure.git
synced 2026-04-18 11:34:13 +00:00
An overhaul and cleanup of the transactions feature including: - Simplification of transactions search and filtering - Consolidation of account sync logic after transaction change - Split sidebar modal and modal into "drawer" and "modal" concepts - Refactor of transaction partials and folder organization - Cleanup turbo frames and streams for transaction updates, including new Transactions::RowsController for inline updates - Refactored and added several integration and systems tests
11 lines
313 B
Ruby
11 lines
313 B
Ruby
class Transaction::Merchant < ApplicationRecord
|
|
has_many :transactions, dependent: :nullify
|
|
belongs_to :family
|
|
|
|
validates :name, :color, :family, presence: true
|
|
|
|
scope :alphabetically, -> { order(:name) }
|
|
|
|
COLORS = %w[#e99537 #4da568 #6471eb #db5a54 #df4e92 #c44fe9 #eb5429 #61c9ea #805dee #6ad28a]
|
|
end
|