Commit 220a6675 by nnnghia98

removing some code

parent da6e89c7
module JobHelper module JobHelper
def view_jobs_count(count)
params[:city_id] ? count : (params[:industry_id] ? count : count)
end
def view_search_result def view_search_result
params[:city_id] ? "City: #{@jobs[0]["city"]}" : params[:city_id] ? "City: #{@jobs[0]["city"]}" :
(params[:industry_id] ? "Industry: #{@jobs[0]["industry"]}" : params[:search]) (params[:industry_id] ? "Industry: #{@jobs[0]["industry"]}" : params[:search])
......
require "rsolr" require "rsolr"
require 'benchmark'
class SolrService class SolrService
def initialize(search_keyword) def initialize(search_keyword)
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<%= submit_tag "Search", class: "btn btn-primary mb-2" %> <%= submit_tag "Search", class: "btn btn-primary mb-2" %>
<% end %> <% end %>
<h3>Total: <%= view_jobs_count(@jobs_count) %></h3> <h3>Total: <%= @jobs_count %></h3>
<h3>Result for: <%= view_search_result %></h3> <h3>Result for: <%= view_search_result %></h3>
<%= paginate @jobs %> <%= paginate @jobs %>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment