Skip to content

Instantly share code, notes, and snippets.

@sanaumair
Created March 22, 2012 09:02
Show Gist options
  • Save sanaumair/2157240 to your computer and use it in GitHub Desktop.
Save sanaumair/2157240 to your computer and use it in GitHub Desktop.
def show
def validate params
if !(self.manufacturer == params[:manufacturer] and self.country_code == params[:country_code] and self.model == params[:model])and params[search].nil?
Rails.logger.debug self.inspect
Rails.logger.debug params.inspect
raise Api::Errors::BadRequest.new 'Bad Request it should be like manufacturer-country_code-model'
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment