#472: Fixed: undefined method #auto_publish for BuildList

This commit is contained in:
Vokhmin Alexey V 2015-05-28 01:19:59 +03:00
parent 621b74fef2
commit 5595936c48
1 changed files with 6 additions and 1 deletions

View File

@ -236,7 +236,12 @@ class Projects::BuildListsController < Projects::BaseController
params[:build_list] ||= {}
policy(BuildList).permitted_attributes.each do |key|
params[:build_list][key] = build_list.send(key)
params[:build_list][key] =
if build_list.respond_to?(key)
build_list.send(key)
elsif build_list.respond_to?("#{key}?")
build_list.send("#{key}?")
end
end
params[:arches] = [build_list.arch_id]
[:owner_filter, :status_filter].each { |t| params[t] = 'true' if %w(true undefined).exclude? params[t] }