Class: ApplicationController

Inherits:
ActionController::Base
  • Object
show all
Includes:
Vianney::Utils::Debbug, Vianney::Utils::Query, Vianney::Utils::Render
Defined in:
lib/vianney/controllers/application_controller.rb

Instance Method Summary collapse

Methods included from Vianney::Utils::Render

#html_request?, #render_response

Methods included from Vianney::Utils::Debbug

#print

Instance Method Details

#addObject



45
46
# File 'lib/vianney/controllers/application_controller.rb', line 45

def add
end

#createObject



48
49
50
51
# File 'lib/vianney/controllers/application_controller.rb', line 48

def create
  @resource.save
  render_response @resource if !html_request?
end

#destroyObject



61
62
63
64
# File 'lib/vianney/controllers/application_controller.rb', line 61

def destroy
  @resource.destroy
  render_response @resource if !html_request?
end

#editObject



53
54
# File 'lib/vianney/controllers/application_controller.rb', line 53

def edit
end

#indexObject

METHODS ACTION



37
38
39
# File 'lib/vianney/controllers/application_controller.rb', line 37

def index
  render_response @resource, true if !html_request?
end

#showObject



41
42
43
# File 'lib/vianney/controllers/application_controller.rb', line 41

def show
  render_response @resource if !html_request?
end

#updateObject



56
57
58
59
# File 'lib/vianney/controllers/application_controller.rb', line 56

def update
  @resource.update
  render_response @resource if !html_request?
end