|
|
|
@ -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 }
|
|
|
|
|