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

Close #2249 Add section tab in taxon edit screen #2250

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

mengthong-ly
Copy link
Collaborator

@mengthong-ly mengthong-ly commented Jan 10, 2025

github-demo

@mengthong-ly mengthong-ly force-pushed the 2249-add-section-tab-in-taxon-edit-screen branch from 73c01dc to c1a0dd8 Compare January 10, 2025 17:20
@mengthong-ly mengthong-ly force-pushed the 2249-add-section-tab-in-taxon-edit-screen branch from c1a0dd8 to 33d4a19 Compare January 10, 2025 17:24
@mengthong-ly mengthong-ly self-assigned this Jan 11, 2025
@mengthong-ly mengthong-ly added enhancement New feature or request feature labels Jan 11, 2025
@mengthong-ly mengthong-ly linked an issue Jan 11, 2025 that may be closed by this pull request
module Spree
module Admin
class ViewEventsController < Spree::Admin::ResourceController
before_action :load_taxonomy_taxon
Copy link
Owner

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])
Copy link
Owner

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
Copy link
Owner

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
Copy link
Owner

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request feature
Projects
Status: 🏗 In progress
Development

Successfully merging this pull request may close these issues.

Add section tab in taxon edit screen
2 participants