diff --git a/app/controllers/softapplications_controller.rb b/app/controllers/softapplications_controller.rb index 9cc940bd..3d6a23a3 100644 --- a/app/controllers/softapplications_controller.rb +++ b/app/controllers/softapplications_controller.rb @@ -7,7 +7,14 @@ class SoftapplicationsController < ApplicationController # GET /softapplications.json def index @softapplications = Softapplication.all - + @limit = 5 + #new added + @softapplication_count = @softapplications.count + @softapplication_pages = Paginator.new @softapplication_count, @limit, params['page'] + @offset ||= @softapplication_pages.offset + @softapplications = @softapplications[@offset,@limit] + #new added end + #@softapplications = @softapplications[@offset,@limit] respond_to do |format| format.html # index.html.erb format.json { render json: @softapplications } diff --git a/app/views/softapplications/index.html.erb b/app/views/softapplications/index.html.erb index eed78146..710f36dc 100644 --- a/app/views/softapplications/index.html.erb +++ b/app/views/softapplications/index.html.erb @@ -59,11 +59,12 @@ <% end %> -