mirror of
https://github.com/we-promise/sure.git
synced 2026-04-21 21:14:17 +00:00
Feat transactions search (#532)
* gem: Add ransack gem * feat: Implement transactions search
This commit is contained in:
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user