Skip to content

Commit

Permalink
Merge pull request #247 from epimorphics/issue/245-undefined-method-e…
Browse files Browse the repository at this point in the history
…mpty-for-integer

Issue/245 undefined method empty for integer
  • Loading branch information
jonrandahl authored Sep 17, 2024
2 parents be08d30 + 3d15889 commit fbb82c0
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 5 deletions.
8 changes: 7 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ This app allows the user to explore HMLR price-paid open linked data.

## Changelog

## 1.7.8 - 2024-09
## 1.7.9 - 2024-09

- (Jon) Moved all mirrored configuration settings from individual environments
into the application configuration to reduce the need to manage multiple
Expand Down Expand Up @@ -40,6 +40,12 @@ This app allows the user to explore HMLR price-paid open linked data.
- (Dan) updates the help modal focus flow to meet accessibility requirments
[GH-218](https://github.com/epimorphics/ppd-explorer/issues/218)

## 1.7.8 - 2024-09

- (Jon) Updated the type check for the current search terms to only sanitise
strings and pass other types, i.e. Date, Integer, as is.
[GH-245](https://github.com/epimorphics/ppd-explorer/issues/245)

## 1.7.7 - 2024-09

- (Jon) Updated search query processing and rendering to santise supplied input
Expand Down
4 changes: 2 additions & 2 deletions app/controllers/search_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ def index
create
end

def create
def create # rubocop:disable Metrics/AbcSize, Metrics/MethodLength, Metrics/PerceivedComplexity
@preferences = UserPreferences.new(params)

if @preferences.empty?
Expand All @@ -33,7 +33,7 @@ def create
:internal_server_error
end

render_error_page(e, e.message, status)
render_error_page(e, e.message, status) if !Rails.env.development?
end

def use_compact_json?
Expand Down
2 changes: 1 addition & 1 deletion app/lib/version.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
module Version
MAJOR = 1
MINOR = 7
PATCH = 8
PATCH = 9
SUFFIX = nil
VERSION = "#{MAJOR}.#{MINOR}.#{PATCH}#{SUFFIX && ".#{SUFFIX}"}"
end
2 changes: 1 addition & 1 deletion app/views/search/_search_results.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
%ul.search-terms.list.list-bullet
- @preferences.each_search_term do |search_term|
- clean_label = sanitize(search_term.label)
- clean_value = search_term.value.is_a?(Date) ? search_term.value : sanitize(search_term.value)
- clean_value = search_term.value.is_a?(String) ? sanitize(search_term.value) : search_term.value
%li
%label
= raw(clean_label)
Expand Down

0 comments on commit fbb82c0

Please sign in to comment.