app/controllers/annotation_categories_controller.rb
# This override is necessary because this controller is acting as a controller
# for both annotation categories and annotation texts.
#
# TODO: move all annotation text routes into their own controller and remove this
This override is necessary because this controller is acting as a controller
for both annotation categories and annotation texts.

move all annotation text routes into their own controller and remove this
This override is necessary because this controller is acting as a controller for both annotation categories and annotation texts . move all annotation text routes into their own controller and remove this
def record
    @record ||= if params[:annotation_category_id]
                  AnnotationText.find_by(id: params[:id])
                elsif params[:annotation_text_id]
                  AnnotationText.find_by(id: params[:annotation_text_id])
                else
                  AnnotationCategory.find_by(id: params[:id])
                end
  end
def record @record ||= if params [ :annotation_category_id ] AnnotationText . find_by ( id : params [ :id ] ) elsif params [ :annotation_text_id ] AnnotationText . find_by ( id : params [ :annotation_text_id ] ) else AnnotationCategory . find_by ( id : params [ :id ] ) end end
This override is necessary because this controller is acting as a controller
for both annotation categories and annotation texts.
This override is necessary because this controller is acting as a controller for both annotation categories and annotation texts .