Commit 4cf18b19 by Thanh Hung Pham

Remove code

parent 4593eb77
......@@ -9,16 +9,6 @@ class Apply < ApplicationRecord
scope :search_city, ->(city_id) { joins(:job).where('? IS NULL OR jobs.city_id = ?', city_id, city_id) }
scope :search_category, ->(category_id) { joins(job: [:job_category]).where('? IS NULL OR job_categories.category_id = ?', category_id, category_id) }
def self.to_csv(options = {})
CSV.generate(options) do |csv|
csv.add_row column_names
all.each do |apply|
values = apply.attributes.values
csv.add_row values
end
end
end
def self.to_csv(apply_attributes = column_names, job_attributes = job.column_names, user_attributes = user.column_names, options = {})
CSV.generate(options) do |csv|
csv.add_row apply_attributes + job_attributes + user_attributes
......
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