app/controllers/class_lists_controller.rb
# The data for a particular class list creator `workspace_id`.
# Users are only authorized to load records they have created themselves.
The data for a particular class list creator `workspace_id`.
Users are only authorized to load records they have created themselves.
The data for a particular class list creator ` workspace_id ` . Users are only authorized to load records they have created themselves .
def class_list_json
    params.require(:workspace_id)
    workspace_id = params[:workspace_id]
    class_list = queries.read_authorized_class_list(workspace_id)
    raise Exceptions::EducatorNotAuthorized if class_list.nil?
    is_editable = queries.is_authorized_for_writes?(workspace_id)
    class_list_json = serialize_class_list(class_list)
    render json: {
      class_list: class_list_json,
      is_editable: is_editable
    }
  end
def class_list_json params . require ( :workspace_id ) workspace_id = params [ :workspace_id ] class_list = queries . read_authorized_class_list ( workspace_id ) raise Exceptions :: EducatorNotAuthorized if class_list . nil? is_editable = queries . is_authorized_for_writes? ( workspace_id ) class_list_json = serialize_class_list ( class_list ) render json : { class_list : class_list_json , is_editable : is_editable } end
The data for a particular class list creator `workspace_id`.
The data for a particular class list creator ` workspace_id ` .