title: rails search result
body: <p>Now I can search only from videos page, How to add search from any page ot the site?</p>
  
  <p>When I want to search from another controller search doesn't redirect to index</p>
  
  <p>my controllers/videos_controller.rb</p>
  
  <pre><code>  def index
      @videos = Video.text_search(params[:query]).page(params[:page]).per(12)
    end
  </code></pre>
  
  <p>my views/shared/_menu.html.erb</p>
  
  <pre><code>&lt;%= form_tag videos_path, method: :get do %&gt;
      &lt;%= search_field_tag :query, params[:query]  %&gt;
  &lt;% end %&gt;
  </code></pre>