Skip to content

Commit

Permalink
fix errors with disabled javascript submitting home_state_name value …
Browse files Browse the repository at this point in the history
…in step 2
  • Loading branch information
Alex Mekelburg committed May 14, 2015
1 parent 0d697f4 commit 1628865
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion app/controllers/step2_controller.rb
Expand Up @@ -25,8 +25,10 @@
class Step2Controller < RegistrationStep
CURRENT_STEP = 2

def update
def update
if params[:javascript_disabled] == "1" && params[:registrant]
# get rid of home_state_name
params.delete(:home_state_name)
reg = params[:registrant]
if reg[:has_mailing_address] == "0"
reg[:has_mailing_address] = !"#{reg[:mailing_address]}#{reg[:mailing_unit]}#{reg[:mailing_city]}#{reg[:mailing_zip_code]}".blank?
Expand Down

0 comments on commit 1628865

Please sign in to comment.