[refs #442] Fix auto_publish select
This commit is contained in:
parent
c3b5951465
commit
10efb2401a
|
@ -17,6 +17,7 @@ class Platforms::PlatformsController < Platforms::BaseController
|
|||
if mass_build.save
|
||||
redirect_to(mass_builds_platform_path(@platform), :notice => t("flash.platform.build_all_success"))
|
||||
else
|
||||
@auto_publish_selected = params[:auto_publish].present? ? params[:auto_publish].present? : false
|
||||
@mass_builds = MassBuild.by_platform(@platform).order('created_at DESC').paginate(:page => params[:page], :per_page => 20)
|
||||
flash[:warning] = mass_build.errors.full_messages.join('. ')
|
||||
flash[:error] = t("flash.platform.build_all_error")
|
||||
|
@ -25,6 +26,7 @@ class Platforms::PlatformsController < Platforms::BaseController
|
|||
|
||||
def mass_builds
|
||||
@mass_builds = MassBuild.by_platform(@platform).order('created_at DESC').paginate(:page => params[:page], :per_page => 20)
|
||||
@auto_publish_selected = true
|
||||
render :action => :build_all
|
||||
end
|
||||
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
.both
|
||||
%h3= t("activerecord.attributes.build_list.preferences")
|
||||
.both.bottom_20
|
||||
= check_box_tag :auto_publish, true, params[:auto_publish].present? ? params[:auto_publish].present? : false, :id => 'auto_publish'
|
||||
= check_box_tag :auto_publish, true, @auto_publish_selected, :id => 'auto_publish'
|
||||
= label_tag :auto_publish
|
||||
|
||||
%br
|
||||
|
|
Loading…
Reference in New Issue