ForestJay / VoteSquared

Repository for Vote Squared platform's code base.
MIT License
4 stars 0 forks source link

Edit is broken! #17

Closed ForestJay closed 10 years ago

ForestJay commented 10 years ago

Arif at Hack for Democracy in Boston discovered that editing a politician (at least Patrick) causes an error:

Private method `update' called for #Politician:0x0000000566d118

Extracted source (around line #31):

@politician = Politician.find(params[:id])

if @politician.update(politician_params) redirect_to @politician else render 'edit'

Rails.root: /VoteSquared

Application Trace | Framework Trace | Full Trace app/controllers/politicians_controller.rb:31:in `update' Request

Parameters:

{"utf8"=>"✓", "_method"=>"patch", "authenticity_token"=>"Nhe/Lw/0GslrGlDWbG6LVeLprHOx8rqlGWKdjqXMVHA=", "politician"=>{"first_name"=>"Deval", "last_name"=>"Patrick", "country"=>"United States of America", "state"=>"MA", "candidate_for"=>"N/A", "current_office"=>"Governor"}, "commit"=>"Update Politician", "id"=>"54149891e1f1ff58a7000002"}

ForestJay commented 10 years ago

This was fixed, thank you Arif!