Class: ModelMirror::MirrorController

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

Overview

Get datas for views

Instance Method Summary collapse

Instance Method Details

#indexObject



8
9
10
# File 'app/controllers/model_mirror/mirror_controller.rb', line 8

def index
  @models = ActiveRecord::Base.descendants
end

#listObject



17
18
19
# File 'app/controllers/model_mirror/mirror_controller.rb', line 17

def list
  @rows = model_class.all
end

#showObject



12
13
14
15
# File 'app/controllers/model_mirror/mirror_controller.rb', line 12

def show
  @row = model_instance
  @model_children = model_children
end