Skip to content
This repository has been archived by the owner on Dec 22, 2023. It is now read-only.

Commit

Permalink
TT-246: clean up code
Browse files Browse the repository at this point in the history
  • Loading branch information
oswaldquek committed Mar 31, 2017
1 parent 93bcdce commit 1545641
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
1 change: 0 additions & 1 deletion app/controllers/feedback_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ def index
@form = FeedbackForm.new({})
flash['feedback_referer'] = request.referer
feedback_source = params['feedback-source'].nil? ? flash['feedback_source'] : params['feedback-source']
flash['feedback_source'] = feedback_source
if feedback_source.nil?
render
elsif FEEDBACK_SOURCE_MAPPER.is_feedback_source_valid(feedback_source)
Expand Down
2 changes: 1 addition & 1 deletion app/models/feedback_source_mapper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def initialize(product_page_url)
end

def is_feedback_source_valid(feedback_source)
@page_to_source_mappings[feedback_source].nil? ? false : true
@page_to_source_mappings.has_key?(feedback_source)
end

def page_from_source(feedback_source, locale)
Expand Down

0 comments on commit 1545641

Please sign in to comment.