Skip to content

Commit

Permalink
Add ransackable attributes for Spree::Store search in admin
Browse files Browse the repository at this point in the history
Enhanced the search capabilities in the admin panel by updating
the `allowed_ransackable_attributes` of the `Spree::Store` 
model.
  • Loading branch information
rainerdema authored and elia committed Dec 6, 2023
1 parent b96773e commit 93941a2
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions core/app/models/spree/store.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ class Store < Spree::Base
validates :url, presence: true
validates :mail_from_address, presence: true

self.allowed_ransackable_attributes = %w[name url code]

before_save :ensure_default_exists_and_is_unique
before_destroy :validate_not_default

Expand Down

0 comments on commit 93941a2

Please sign in to comment.