This repository was archived by the owner on Mar 1, 2026. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -19,14 +19,12 @@ def update
1919 value = false if value == "false"
2020 if @config . var . end_with? ( "_asset" ) && !value . start_with? ( 'http://' , 'https://' )
2121 redirect_to manage_configs_path , notice : "Config \" #{ key } \" was not changed"
22- else
23- if @config . value != value
24- @config . value = value
25- @config . save
26- redirect_to manage_configs_path , notice : "Config \" #{ key } \" has been updated."
27- else
28- redirect_to manage_configs_path , notice : "Config \" #{ key } \" was not changed"
29- end
22+ elsif @config . value != value
23+ @config . value = value
24+ @config . save
25+ redirect_to manage_configs_path , notice : "Config \" #{ key } \" has been updated."
26+ else
27+ redirect_to manage_configs_path , notice : "Config \" #{ key } \" was not changed"
3028 end
3129 end
3230
Original file line number Diff line number Diff line change @@ -117,13 +117,13 @@ class Manage::ConfigsControllerTest < ActionController::TestCase
117117
118118 should "update logo_asset with a url" do
119119 HackathonConfig [ "logo_asset" ] = ''
120- patch :update , params : { id : "logo_asset" , hackathon_config : { logo_asset : "https://picsum.photos/200" } }
120+ patch :update , params : { id : "logo_asset" , hackathon_config : { logo_asset : "https://picsum.photos/200" } }
121121 assert_equal "https://picsum.photos/200" , HackathonConfig [ "logo_asset" ]
122122 end
123123
124- should "update logo_asset with an asset that is not URL based" do
124+ should "update logo_asset with an asset that is not URL based" do
125125 HackathonConfig [ "logo_asset" ] = ''
126- patch :update , params : { id : "logo_asset" , hackathon_config : { logo_asset : "test" } }
126+ patch :update , params : { id : "logo_asset" , hackathon_config : { logo_asset : "test" } }
127127 assert_equal '' , HackathonConfig [ "logo_asset" ]
128128 end
129129
You can’t perform that action at this time.
0 commit comments