Class: Cathode::BaseController

Inherits:
ActionController::Base
  • Object
show all
Defined in:
app/controllers/cathode/base_controller.rb

Instance Method Summary collapse

Instance Method Details

#createObject



8
9
10
# File 'app/controllers/cathode/base_controller.rb', line 8

def create
  render json: model.create(resource_params)
end

#destroyObject



12
13
14
15
# File 'app/controllers/cathode/base_controller.rb', line 12

def destroy
  resource.destroy
  head :ok
end

#indexObject



4
5
6
# File 'app/controllers/cathode/base_controller.rb', line 4

def index
  render json: resources.load
end

#showObject



17
18
19
# File 'app/controllers/cathode/base_controller.rb', line 17

def show
  make_request(request)
end