Syntaf/wetrockpolice

Validation fails on membership signups

Closed this issue · 1 comments

Steps to reproduce

Description

The following error message is logged on production:

2020-03-24T17:09:51.467866+00:00 app[web.1]: [62650679-953f-4928-b280-8b9ea2ef2b5d] Started POST "/redrock/sncc/validate" for 174.68.138.199 at 2020-03-24 17:09:51 +0000
2020-03-24T17:09:51.469001+00:00 app[web.1]: [62650679-953f-4928-b280-8b9ea2ef2b5d] Processing by Area::MembershipsController#validate as */*
2020-03-24T17:09:51.469144+00:00 app[web.1]: [62650679-953f-4928-b280-8b9ea2ef2b5d]   Parameters: {"authenticity_token"=>"L/9/9NouUYJ2nST8nRvUco8124oZbJmy63+4clgDALpzScpKKAMMREKcFEo/rMLmJwMRaB5Z/h9sweAljXwR6A==", "joint_membership_application"=>{"organization"=>"Southern Nevada Climbers Coalition", "order_id"=>"", "paid_cash"=>"false", "amount_paid"=>"0", "first_name"=>"", "last_name"=>"", "email"=>"", "phone_number"=>"", "street_line_one"=>"", "street_line_two"=>"", "zipcode"=>"", "city"=>"", "state"=>"", "access_fund_shirt"=>"0"}, "slug"=>"redrock", "coalition_slug"=>"sncc"}
2020-03-24T17:09:51.982964+00:00 app[web.1]: [62650679-953f-4928-b280-8b9ea2ef2b5d] Completed 500 Internal Server Error in 514ms (ActiveRecord: 0.0ms | Allocations: 193795)
2020-03-24T17:09:52.150700+00:00 app[web.1]: [62650679-953f-4928-b280-8b9ea2ef2b5d]   
2020-03-24T17:09:52.150704+00:00 app[web.1]: [62650679-953f-4928-b280-8b9ea2ef2b5d] NameError (undefined local variable or method `membership' for #<Area::MembershipsController:0x00005586f72faa70>
2020-03-24T17:09:52.150710+00:00 app[web.1]: Did you mean?  membership_url):
2020-03-24T17:09:52.150710+00:00 app[web.1]: [62650679-953f-4928-b280-8b9ea2ef2b5d]   
2020-03-24T17:09:52.150711+00:00 app[web.1]: [62650679-953f-4928-b280-8b9ea2ef2b5d] app/controllers/area/memberships_controller.rb:43:in `validate'
2020-03-24T17:09:52.156875+00:00 heroku[router]: at=info method=POST path="/redrock/sncc/validate" host=www.wetrockpolice.com request_id=62650679-953f-4928-b280-8b9ea2ef2b5d fwd="174.68.138.199" dyno=web.1 connect=1ms service=691ms status=500 bytes=1891 protocol=https

Acceptance Criteria

  • Validation works
  • A test covering the bug has been written and passes

Fixed in 3285b45