░▒▓████████████████████████████████▓▒░ ░▒▓█ ▓▒░ ░▒▓█ ~ S W A M P ~ ▓▒░ ░▒▓█ ▓▒░ ░▒▓████████████████████████████████▓▒░
pplmvsvm
LOCATION:
/var/www/canvas/doc/api/method_details/html
☗ ROOT
↻ REFRESH
✎ CARVE FLESH
EDITING: setup.rb
# frozen_string_literal: true # # Copyright (C) 2011 Instructure, Inc. # # This file is part of Canvas. # # Canvas is free software: you can redistribute it and/or modify it under # the terms of the GNU Affero General Public License as published by the Free # Software Foundation, version 3 of the License. # # Canvas is distributed in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU Affero General Public License for more # details. # # You should have received a copy of the GNU Affero General Public License along # with this program. If not, see <http://www.gnu.org/licenses/>. # def init get_routes sections :header, [:method_signature, T("docstring")] end def header get_routes @subtopic = (object.tag("subtopic") || object.parent.tag("subtopic") || object.parent.tag("API")).text route = @routes.first @method_link = "method.#{route.requirements[:controller]}.#{route.requirements[:action]}" @beta = object.tag("beta") || object.parent.tag("beta") if object.has_tag?(:deprecated_method) @deprecated_method = DeprecatedMethodView.new(object.tag(:deprecated_method)) end erb(:header) end def get_routes @controller = object.parent.path.underscore.sub("_controller", "") @action = object.path.sub(/^.*#/, "") @action = @action.sub(/_with_.*$/, "") @routes = ApiRouteSet.api_methods_for_controller_and_action(@controller, @action) @route = @routes.first raise "Could not find route for #{object}" unless @route @controller_path = "app/controllers/#{@route.requirements[:controller]}_controller.rb" @controller_path = nil unless Rails.root.join(@controller_path).file? end
CANCEL
Name
Type
Size
Modified
Actions
↩ ..
DIR
—
—
📄 header.erb
ERB
1.1 KB
2023-09-24 03:36
EDIT
📄 method_signature.erb
ERB
339 B
2023-09-24 03:36
EDIT
📄 setup.rb
RB
1.7 KB
2023-09-24 03:36
EDIT