title: Multi keyword search
body: <p>I currently have a basic search that will allow me to type in a word and it will return back all records that are like that search. It is as followed:</p>
  
  <p>application.html.erb</p>
  
  <pre><code>        &lt;%= form_tag games_path, :method =&gt; 'get' do %&gt;
              &lt;%= hidden_field_tag :direction, params[:direction] %&gt;
              &lt;%= hidden_field_tag :sort, params[:sort] %&gt;
              &lt;%= text_field_tag :search, params[:search] %&gt;
          &lt;%= submit_tag t('.searchb'), :game_name =&gt; nil %&gt;
          &lt;% end %&gt;
  </code></pre>
  
  <p>controller and Model</p>
  
  <pre><code>        @games = Game.search(params[:search])
  
    def self.search(search)
       search = search.to_s.strip.split
       search.inject(scoped) do |combined_scope, search|
       combined_scope.where(['game_name LIKE ? OR genre LIKE ? OR console LIKE ?', "%#{search}%", "%#{search}%", "%#{search}%"])
      end
    end   
  </code></pre>
  
  <p>What I now wish to do though is the ability to enter multiple words in to the search bar and have it return all related records to those words rather than any record that has them all.</p>
  
  <p>e.g. If I type fighting, action</p>
  
  <p>I want it to return all fighting games and all action games.</p>
  
  <p>How would I go about implementing this?
  Model:</p>
  
  <p>EDIT</p>