From d3e1a2be2308c1f80b66a341280821f8b4888ae7 Mon Sep 17 00:00:00 2001 From: Alexander Machehin Date: Fri, 2 Aug 2013 17:39:09 +0600 Subject: [PATCH] [#247] small refactoring mass builds controller --- app/controllers/platforms/mass_builds_controller.rb | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/app/controllers/platforms/mass_builds_controller.rb b/app/controllers/platforms/mass_builds_controller.rb index 8fdb63bb6..06d8d0478 100644 --- a/app/controllers/platforms/mass_builds_controller.rb +++ b/app/controllers/platforms/mass_builds_controller.rb @@ -11,9 +11,7 @@ class Platforms::MassBuildsController < Platforms::BaseController end def create - @mass_build = @platform.mass_builds.build params[:mass_build] - @mass_build.user = current_user - @mass_build.arches = params[:arches] + @mass_build.user, @mass_build.arches = current_user, params[:arches] if @mass_build.save redirect_to(platform_mass_builds_path(@platform), :notice => t("flash.platform.build_all_success"))