Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Admin] Add Stores index component #5537

Merged
merged 2 commits into from
Dec 6, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Add ransackable attributes for Spree::Store search in admin
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
commit 93941a22d6d8fd95e870dd369e3249d0ec4f017e
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