aboutsummaryrefslogtreecommitdiffstats
path: root/app/controllers
diff options
context:
space:
mode:
Diffstat (limited to 'app/controllers')
-rw-r--r--app/controllers/public_body_controller.rb4
-rw-r--r--app/controllers/request_controller.rb6
2 files changed, 10 insertions, 0 deletions
diff --git a/app/controllers/public_body_controller.rb b/app/controllers/public_body_controller.rb
index f46e55014..4ca8d1404 100644
--- a/app/controllers/public_body_controller.rb
+++ b/app/controllers/public_body_controller.rb
@@ -76,6 +76,10 @@ class PublicBodyController < ApplicationController
elsif @tag.size == 1
@tag.upcase!
conditions = ['first_letter = ?', @tag]
+ elsif @tag.include?(":")
+ name, value = PublicBodyTag.split_tag_into_name_value(@tag)
+ conditions = ['(select count(*) from public_body_tags where public_body_tags.public_body_id = public_bodies.id
+ and public_body_tags.name = ? and public_body_tags.value = ?) > 0', name, value]
else
conditions = ['(select count(*) from public_body_tags where public_body_tags.public_body_id = public_bodies.id
and public_body_tags.name = ?) > 0', @tag]
diff --git a/app/controllers/request_controller.rb b/app/controllers/request_controller.rb
index b2f6e8631..767bb8488 100644
--- a/app/controllers/request_controller.rb
+++ b/app/controllers/request_controller.rb
@@ -131,6 +131,12 @@ class RequestController < ApplicationController
# Page new form posts to
def new
+ # Allow url_name
+ if !params[:public_body_url_name].nil? && params
+ end
+ if params[:submitted_new_request].nil?
+ end
+
# All new requests are of normal_sort
if !params[:outgoing_message].nil?
params[:outgoing_message][:what_doing] = 'normal_sort'