]> projects.mako.cc - selectricity/commitdiff
Can upload images on the edit_general_information page as well, but has no checks...
author<jlsharps@mit.edu> <>
Thu, 29 May 2008 20:34:02 +0000 (16:34 -0400)
committer<jlsharps@mit.edu> <>
Thu, 29 May 2008 20:34:02 +0000 (16:34 -0400)
app/controllers/election_controller.rb

index 6cd12bcb6154be9b7198257570883a7f98e1ec9d..4e59ca8d56a9c0836c69c12bfd5abd3a097126b6 100644 (file)
@@ -69,7 +69,7 @@ class ElectionController < ApplicationController
   def update_general_information
     @election = Election.find(params[:id])
     
   def update_general_information
     @election = Election.find(params[:id])
     
-    unless params[:top_bar][:uploaded_data].to_s.empty?
+    unless (params[:top_bar][:uploaded_data].to_s.empty? and params[:default_image][:uploaded_data].to_s.empty? and params[:bg1][:uploaded_data].to_s.empty? and params[:bg2][:uploaded_data].to_s.empty? and params[:bottom_bar][:uploaded_data].to_s.empty?)
       add_theme(@election.embed_custom_string)
     end
     
       add_theme(@election.embed_custom_string)
     end
     

Benjamin Mako Hill || Want to submit a patch?