Class: ImagesController
- Inherits:
-
ApplicationController
- Object
- ActionController::Base
- ApplicationController
- ImagesController
- Defined in:
- app/controllers/images_controller.rb
Instance Method Summary collapse
- #index ⇒ Object
- #list ⇒ Object
-
#show ⇒ Object
images/show/1.json.
- #total ⇒ Object
Instance Method Details
#index ⇒ Object
4 5 |
# File 'app/controllers/images_controller.rb', line 4 def index end |
#list ⇒ Object
15 16 17 18 19 20 21 22 |
# File 'app/controllers/images_controller.rb', line 15 def list data = { :start => params[:start].to_i - 1, :limit => params[:limit] } image = DcmgrResource::Image.list(data) respond_with(image[0],:to => [:json]) end |
#show ⇒ Object
images/show/1.json
8 9 10 11 12 |
# File 'app/controllers/images_controller.rb', line 8 def show image_id = params[:id] detail = DcmgrResource::Image.show(image_id) respond_with(detail,:to => [:json]) end |
#total ⇒ Object
24 25 26 27 |
# File 'app/controllers/images_controller.rb', line 24 def total total_resource = DcmgrResource::Image.total_resource render :json => total_resource end |