fix error "undefined method map for nil:NilClass"

This commit is contained in:
Alexander Machehin 2014-08-28 19:23:41 +06:00
parent 74bd058e68
commit 872e3d9111
1 changed files with 10 additions and 7 deletions

View File

@ -42,12 +42,15 @@ class Platforms::MassBuildsController < Platforms::BaseController
end
def index
if request.xhr?
respond_to do |format|
format.html {}
format.json {
@mass_builds = @platform.mass_builds
@total_mass_builds = @mass_builds.count
@mass_builds = @mass_builds.order("id #{sort_dir}")
@mass_builds = @mass_builds.search(params[:sSearch]).
paginate(page: page, per_page: per_page)
.search(params[:sSearch])
.paginate(page: page, per_page: per_page)
}
end
end