Class: HierarchyController

Inherits:
ApplicationController show all
Defined in:
app/controllers/hierarchy_controller.rb

Overview

Copyright 2011-2013 innoQ Deutschland GmbH

Licensed under the Apache License, Version 2.0 (the “License”); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Instance Method Summary collapse

Instance Method Details

#indexObject



44
45
46
47
48
49
50
# File 'app/controllers/hierarchy_controller.rb', line 44

def index
  authorize! :read, Iqvoc::Concept.base_class

  depth = params[:depth] || (unbounded? ? -1 : nil)

  render_hierarchy 'scheme', depth, unbounded?
end

#showObject



85
86
87
88
89
# File 'app/controllers/hierarchy_controller.rb', line 85

def show
  authorize! :read, Iqvoc::Concept.base_class

  render_hierarchy params[:root], params[:depth], unbounded?
end