Class: Vimo::EntitiesController
Instance Method Summary
collapse
#max_per_page, #page, #per_page
Instance Method Details
#create ⇒ Object
19
20
21
22
|
# File 'app/controllers/vimo/entities_controller.rb', line 19
def create
@entity = entities_scope.create(entity_params)
respond_with @entity
end
|
#destroy ⇒ Object
29
30
31
32
|
# File 'app/controllers/vimo/entities_controller.rb', line 29
def destroy
@entity.destroy
respond_with @entity
end
|
#index ⇒ Object
10
11
12
13
|
# File 'app/controllers/vimo/entities_controller.rb', line 10
def index
@entities = entities_scope.page(page).per(per_page)
respond_with @entities
end
|
#show ⇒ Object
15
16
17
|
# File 'app/controllers/vimo/entities_controller.rb', line 15
def show
respond_with @entity
end
|
#update ⇒ Object
24
25
26
27
|
# File 'app/controllers/vimo/entities_controller.rb', line 24
def update
@entity.update(entity_params)
respond_with @entity
end
|