mirror of
https://github.com/maybe-finance/maybe.git
synced 2025-08-05 05:25:24 +02:00
Feat transactions search (#532)
* gem: Add ransack gem * feat: Implement transactions search
This commit is contained in:
parent
7f2633f9da
commit
cca779d3c4
9 changed files with 116 additions and 33 deletions
|
@ -15,6 +15,14 @@ class Transaction::Category < ApplicationRecord
|
|||
{ internal_category: "home_improvement", color: "#fdcce5" }
|
||||
]
|
||||
|
||||
def self.ransackable_attributes(auth_object = nil)
|
||||
%w[name]
|
||||
end
|
||||
|
||||
def self.ransackable_associations(auth_object = nil)
|
||||
%w[]
|
||||
end
|
||||
|
||||
def self.create_default_categories(family)
|
||||
if family.transaction_categories.size > 0
|
||||
raise ArgumentError, "Family already has some categories"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue