Created
March 22, 2012 09:17
-
-
Save sanaumair/2157281 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def show { | |
options = { | |
:item_type => @result_item.item_type, | |
:manufacturer => @result_item.manufacturer , | |
:country_code => @result_item.country_code, | |
:model => @result_item.model, | |
:id =>@result_item.id, | |
} | |
Rails.logger.debug " ----#{result_item_url(options)}" | |
Rails.logger.debug "message#{URI.decode(request.url)}" | |
raise Api::Errors::BadRequest.new 'Bad Request it should be like manufacturer-country_code-model' if URI.decode(request.url).to_s.include?(result_item_url(options).to_s) | |
#it shud raise error if the the url generated by (result_item_url(options) doesnt match the substring in requested url |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment