Skip to content

Commit

Permalink
Merge branch 'hotfix/0.39.1.3'
Browse files Browse the repository at this point in the history
  • Loading branch information
gbp committed Aug 4, 2021
2 parents c3bbcb1 + 9de50e9 commit 7618a51
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 6 deletions.
13 changes: 8 additions & 5 deletions app/models/survey.rb
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,14 @@ def initialize(public_body)
def url
return Survey.url if user_too_identifiable?

Addressable::URI.parse(Survey.url).tap do |url|
url.query_values = (url.query_values || {}).merge(
authority_id: public_body.to_param
)
end.to_s
uri = URI(Survey.url)

new_query = Hash[URI.decode_www_form(uri.query.to_s)].merge(
authority_id: public_body.to_param
)
uri.query = URI.encode_www_form(new_query)

uri.to_s
end

protected
Expand Down
2 changes: 1 addition & 1 deletion config/initializers/alaveteli.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
load "util.rb"

# Application version
ALAVETELI_VERSION = '0.39.1.2'
ALAVETELI_VERSION = '0.39.1.3'

# Add new inflection rules using the following format
# (all these examples are active by default):
Expand Down
6 changes: 6 additions & 0 deletions doc/CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
# 0.39.1.3

## Highlighted Features

* Fix broken alert-survey script (Graeme Porteous)

# 0.39.1.2

## Highlighted Features
Expand Down

0 comments on commit 7618a51

Please sign in to comment.