Skip to content

Instantly share code, notes, and snippets.

@cvd
Created September 30, 2015 17:31
Show Gist options
  • Save cvd/6a41e9537c864cae1bc2 to your computer and use it in GitHub Desktop.
Save cvd/6a41e9537c864cae1bc2 to your computer and use it in GitHub Desktop.
diff --git a/app/models/data_platform/filters/implementation_period.rb b/app/models/data_platform/filters/implementation_period.rb
index 9f4162b..e337f72 100644
--- a/app/models/data_platform/filters/implementation_period.rb
+++ b/app/models/data_platform/filters/implementation_period.rb
@@ -11,7 +11,7 @@ class DataPlatform::Filters::ImplementationPeriod < DataPlatform::Filters::Base
def self.options(params)
::ImplementationPeriod
.where('title ILIKE ?', "%#{params[:q]}%")
- .select('title as text, id')
+ .select("title || ' ' || coalesce(market, '') as text, id")
.order('title')
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment