Commit c4c3b235 by Ngô Trung Hưng

..

parent 1342036a
Pipeline #808 canceled with stages
in 0 seconds
......@@ -19,8 +19,9 @@ class JobController < ApplicationController
result(company)
end
def find_jobs_by(model, parameter)
obj = model.find(parameter)
def find_jobs
d = params[:model].capitalize
obj = .find(params[:id])
result(obj)
end
......
......@@ -6,7 +6,6 @@ Rails.application.routes.draw do
get 'city/index'
# Search
get 'jobs/industry/:key_industry', to: 'job#find_jobs_by_industry'
get 'jobs/company/:key_company', to: 'job#find_jobs_by_company'
get 'jobs/city/:key_city', to: 'job#find_jobs_by_city'
get 'jobs/:model/:id', to: 'job#find_jobs'
end
......@@ -5,7 +5,7 @@ require 'open-uri'
# rake task
namespace :crawler do
task populate: :environment do
NUMBER_LINK_WILL_BE_CRAWLER = 1
NUMBER_LINK_WILL_BE_CRAWLER = 4
Company.find_or_create_by(name: 'Bảo mật') do |company|
company.address = 'Vui lòng xem trong mô tả công việc'
company.short_description = 'Vui lòng xem trong mô tả công việc'
......
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