feature/top page/ top industries
_Create header with logo and url lists, create scope in Job model , add bootstrap files in stylesheet.Wirte custom css for index.html.erb.
_Add total jobs in header, show top cities, use custom.scss.
_Import from CSV for Industry & IndustryJob table.Add view for industry list, config Industry model, top_controller
and settings.yml for limit industry, 
-
-
-
-
-
changed title from First commit to Top page ( latest jobs)
Toggle commit list -
changed title from Top page ( latest jobs) to feature/top page/ latest jobs
Toggle commit list -
-
-
-
-
-
-
-
-
-
-
-
-
-
Toggle commit list
-
-
changed title from feature/top page/ latest jobs to feature/top page/ top cities
Toggle commit list -
changed the description
Toggle commit list -
-
resolved all discussions
Toggle commit list -
added 2 commits
Toggle commit list -
resolved all discussions
Toggle commit list -
resolved all discussions
Toggle commit list -
resolved all discussions
Toggle commit list -
resolved all discussions
Toggle commit list -
resolved all discussions
Toggle commit list -
app/assets/stylesheets/custom.scss 0 → 100644
58 } 59 60 .row { 61 padding: 5px; 62 margin: 5px; 63 background-color: $sub-color; 64 } 65 66 .col-sm { 67 margin: 5px; 68 padding: 5px; 69 background-color: $primary-color; 70 } 71 72 .form-inline-city { 73 margin-left: 1000px; -
Master
Cẩn thận mấy chỗ này, giả sử màn hình của user nhỏ hơn 1000px thì cái city chạy đi đâu :) Tương tự:
.count-total -
-
-
285 296 DEPENDENCIES 286 297 activerecord-import 287 298 bootsnap (>= 1.4.2) 299 bootstrap-sass (= 3.3.7) 288 300 byebug 289 301 capybara (>= 2.15) 290 302 config -
Master
Gemfilecó bị thay đổi không saoGemfile.locklại bị thay đổi vậy?
-
-
24 job = Job.find_or_initialize_by(title: row["name"], company_id: company.id) 25 job.update(job_params) 16 job_params = { 17 description: row["description"], 18 position: row["level"], 19 salary: row["salary"], 20 requirement: row["requirement"] 21 } 22 job = Job.find_or_initialize_by(title: row["name"], company_id: company.id) 23 job.update(job_params) 24 25 city_params = { region: row["work place"] } 26 city = City.find_or_initialize_by(name: row["company province"]) 27 city.update(city_params) 28 city_job_params = { city_id: city.id } 29 city_job = CityJob.find_or_initialize_by(job_id: job.id) -
Master
Dòng này có nghĩa bảng này đối với 1
job_idthì sẽ chỉ có 1 record thôi. Nhưng anh xem model thì nó được define làhas_manynhư vậy logic chỗ này có đúng không? em check lại 1 lần. -
Master
CityJob.find_or_initialize_by(job_id: job.id, city_id: city.id) -
-
-
Toggle commit list
-
-
-
changed title from feature/top page/ top cities to feature/top page/ top industries
Toggle commit list -
changed the description
Toggle commit list -
changed the description
Toggle commit list -
app/assets/javascripts/application.js 0 → 100644
1 //= require bootstrap -
Master
a không thấy em có file
bootstrap.jsphải là file min chứ nhỉ? -
-
-
1 1 class Industry < ApplicationRecord 2 2 has_many :industry_jobs 3 has_many :jobs, through: :industry_jobs 4 5 def self.sort_top_industries 6 @cindustries ||= all.sort_by(&:jobs_count).reverse -
Master
bad naming
-
-
-
-
merged
Toggle commit list -
-
app/controllers/top_controller.rb 0 → 100644
1 class TopController < ApplicationController 2 def index 3 @latest_jobs = Job.latest_jobs.take(Settings.top.job.limit) 4 @top_cities = City.sort_top_cities.take(Settings.top.city.limit) 5 @top_industries = Industry.sort_top_industries.take(Settings.top.industry.limit) -
app/views/cities/_city.html.erb 0 → 100644
-
app/views/industries/_industry.html.erb 0 → 100644