Class: Bulk::ApiController

Inherits:
ActionController::Base
  • Object
show all
Defined in:
app/controllers/bulk/api_controller.rb

Instance Method Summary collapse

Instance Method Details

#create {|options| ... } ⇒ Object

Yields:

  • (options)


8
9
10
11
12
# File 'app/controllers/bulk/api_controller.rb', line 8

def create
  options = Bulk::Resource.create(self)
  yield options if block_given?
  render options
end

#delete {|options| ... } ⇒ Object

Yields:

  • (options)


20
21
22
23
24
# File 'app/controllers/bulk/api_controller.rb', line 20

def delete
  options = Bulk::Resource.delete(self)
  yield options if block_given?
  render options
end

#get {|options| ... } ⇒ Object

Yields:

  • (options)


2
3
4
5
6
# File 'app/controllers/bulk/api_controller.rb', line 2

def get
  options = Bulk::Resource.get(self)
  yield options if block_given?
  render options
end

#update {|options| ... } ⇒ Object

Yields:

  • (options)


14
15
16
17
18
# File 'app/controllers/bulk/api_controller.rb', line 14

def update
  options = Bulk::Resource.update(self)
  yield options if block_given?
  render options
end