Class: Motor::SchemaController

Inherits:
ApiBaseController show all
Defined in:
app/controllers/motor/schema_controller.rb

Instance Method Summary collapse

Methods included from CurrentAbility

#current_ability

Methods included from CurrentUserMethod

#current_user

Instance Method Details

#indexObject


9
10
11
# File 'app/controllers/motor/schema_controller.rb', line 9

def index
  render json: { data: schema }
end

#showObject


13
14
15
# File 'app/controllers/motor/schema_controller.rb', line 13

def show
  render json: { data: schema.find { |model| model[:name] == resource_class.name.underscore } }
end