Commit 39a4990a by Ngô Trung Hưng

joblist beta

parent d4ef13ab
Pipeline #822 failed with stages
in 0 seconds
......@@ -23,4 +23,3 @@ class JobController < ApplicationController
render 'result_data'
end
end
Object.const_get('cities'.classify)
\ No newline at end of file
......@@ -17,6 +17,6 @@ class City < ApplicationRecord
end
def convert_to_slug
self.slug = Slug.to_slug(self.name)
self.slug = Slug.to_slug(self.name + ' ' + rand(10000).to_s)
end
end
......@@ -12,6 +12,6 @@ class Industry < ApplicationRecord
end
def convert_to_slug
self.slug = Slug.to_slug(self.name)
self.slug = Slug.to_slug(self.name + ' ' + rand(10000).to_s)
end
end
......@@ -2,8 +2,8 @@
Rails.application.routes.draw do
root 'home#index'
get 'industry/index'
get 'city/index'
get 'industries', to: 'industry#index', as: :industry_index
get 'cities', to: 'city#index', as: :city_index
# Search
get 'jobs/:model/:slug', to: 'job#index', as: :jobs
......
......@@ -5,7 +5,7 @@ require 'open-uri'
# rake task
namespace :crawler do
task populate: :environment do
NUMBER_LINK_WILL_BE_CRAWLER = 7
NUMBER_LINK_WILL_BE_CRAWLER = 6
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