class SubjectsSidenavSubMenuComponent < BaseComponent attr_reader :opts def initialize(current_user:, opts:) @opts = opts end def index_url(subject_id) return search_doctrines_path(subject_ids: [subject_id], is_index_table: false) if opts[:is_doctrines_index].present? search_doctrines_path(subject_ids: [subject_id], is_index_table: true) end end