class SubjectIndexFormComponent < BaseComponent attr_reader :subject_index, :parent_id, :opts def initialize(current_user:, subject_index:, opts:) @subject_index = subject_index @opts = opts @parent_id = @opts[:parent_id] end def current_library Cdao::Library.first end def render? subject_index.present? && opts[:form_url].present? && opts[:form_method].present? end end