Class: Vimo::ItemsController
Instance Method Summary
collapse
#max_per_page, #page, #per_page
Instance Method Details
#create ⇒ Object
20
21
22
23
|
# File 'app/controllers/vimo/items_controller.rb', line 20
def create
@item = items.build
save_and_respond
end
|
#destroy ⇒ Object
29
30
31
32
|
# File 'app/controllers/vimo/items_controller.rb', line 29
def destroy
@item.destroy
respond_with @entity, @item
end
|
#index ⇒ Object
11
12
13
14
|
# File 'app/controllers/vimo/items_controller.rb', line 11
def index
@items = @entity.items.page(page).per(per_page)
respond_with @entity, @items
end
|
#show ⇒ Object
16
17
18
|
# File 'app/controllers/vimo/items_controller.rb', line 16
def show
respond_with @entity, @item
end
|
#update ⇒ Object
25
26
27
|
# File 'app/controllers/vimo/items_controller.rb', line 25
def update
save_and_respond
end
|