-
Notifications
You must be signed in to change notification settings - Fork 4
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
Close #2249 Add section tab in taxon edit screen #2250
base: develop
Are you sure you want to change the base?
Conversation
mengthong-ly
commented
Jan 10, 2025
•
edited
Loading
edited
73c01dc
to
c1a0dd8
Compare
c1a0dd8
to
33d4a19
Compare
module Spree | ||
module Admin | ||
class ViewEventsController < Spree::Admin::ResourceController | ||
before_action :load_taxonomy_taxon |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
explicitly add which action to apply:
before_action :load_taxonomy_taxon, only: [:index]
|
||
def index | ||
# Fetch the specific taxon associated with the taxonomy | ||
@taxon = @taxonomy.taxons.find(params[:taxon_id]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you don't need this because the load_taxonomy_taxon already does just this.
@@ -0,0 +1,4 @@ | |||
module SpreeCmCommissioner | |||
class ViewEvent < ApplicationRecord |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove this, the model is linked to a table in the DB.
@@ -0,0 +1,23 @@ | |||
module Spree | |||
module Admin | |||
class ViewEventsController < Spree::Admin::ResourceController |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not decorating the existing TaxonController? Naming a new controller can be challenging, and if the new controller is minimal, the additional effort might not be justified.