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