Skip to content

Instantly share code, notes, and snippets.

@kopylovvlad
Created March 8, 2017 18:51
Show Gist options
  • Save kopylovvlad/34c746d6d991c3c24f94037a13a9d680 to your computer and use it in GitHub Desktop.
Save kopylovvlad/34c746d6d991c3c24f94037a13a9d680 to your computer and use it in GitHub Desktop.
= form_tag '/search', method: 'GET' do
= text_field_tag :query, params[:query]
= submit_tag 'Искать'
- if @searching.present?
.search_resulting
p
| Были найдены следующие результаты
- @searching.results.each do |result|
.search_result
h3= result[:hint][:title]
p= result[:hint][:preview]
br
small= result[:hint][:type]
br
= link_to 'Подробнее', search_result_link(result)
.search_paging
= will_paginate @searching.raw_data
- unless @searching.present?
p К сожалению, ничего не найдено
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment