class WelcomeController < ApplicationController
  def index
    @questions = Question.all.order('created_at DESC')
  end

  def show

  end
end
class WelcomeController < ApplicationController
  def index
    @questions = Question.all.order('created_at DESC')
  end

  def show

  end

  def search
    @questions = Question.search(params[:words])
    render 'index'
  end
end
Add search method in welcome controller.
Add search method in welcome controller.
