Sha256: b68be8278a33c8ad309177a4a5c93fdfc2a94a1319463a8b02204fc52aabe8bd

Contents?: true

Size: 796 Bytes

Versions: 80

Compression:

Stored size: 796 Bytes

Contents

json.data do
  json.array! @businesses do |d|
    business = EducodeSales::Business.unscoped.find(d.source_id)
    json.id d.id
    json.name business.name
    json.school business.department.school.name
    json.department business.department.name
    json.last_follow_person business.last_follow_up_id.present? ? EducodeSales::FollowUp.unscoped.find(business.last_follow_up_id).staff.user.real_name : EducodeSales::Staff.find(business.staff_id).user.real_name
    json.latest_time business.last_follow_up_id.present? ? EducodeSales::FollowUp.unscoped.find(business.last_follow_up_id).created_at.to_s : business.created_at.to_s
    json.deleter EducodeSales::Staff.find(d.deleter_id).user.real_name
    json.delete_time d.created_at.to_s
  end
end

json.code 0
json.count @businesses.total_count

Version data entries

80 entries across 80 versions & 1 rubygems

Version Path
educode_sales-0.9.57 app/views/educode_sales/recycles/business.json.jbuilder
educode_sales-0.9.56 app/views/educode_sales/recycles/business.json.jbuilder
educode_sales-0.9.55 app/views/educode_sales/recycles/business.json.jbuilder
educode_sales-0.9.54 app/views/educode_sales/recycles/business.json.jbuilder
educode_sales-0.9.53 app/views/educode_sales/recycles/business.json.jbuilder
educode_sales-0.9.52 app/views/educode_sales/recycles/business.json.jbuilder
educode_sales-0.9.51 app/views/educode_sales/recycles/business.json.jbuilder
educode_sales-0.9.50 app/views/educode_sales/recycles/business.json.jbuilder
educode_sales-0.9.49 app/views/educode_sales/recycles/business.json.jbuilder
educode_sales-0.9.48 app/views/educode_sales/recycles/business.json.jbuilder
educode_sales-0.9.47 app/views/educode_sales/recycles/business.json.jbuilder
educode_sales-0.9.46 app/views/educode_sales/recycles/business.json.jbuilder
educode_sales-0.9.45 app/views/educode_sales/recycles/business.json.jbuilder
educode_sales-0.9.44 app/views/educode_sales/recycles/business.json.jbuilder
educode_sales-0.9.43 app/views/educode_sales/recycles/business.json.jbuilder
educode_sales-0.9.42 app/views/educode_sales/recycles/business.json.jbuilder
educode_sales-0.9.41 app/views/educode_sales/recycles/business.json.jbuilder
educode_sales-0.9.40 app/views/educode_sales/recycles/business.json.jbuilder
educode_sales-0.9.39 app/views/educode_sales/recycles/business.json.jbuilder
educode_sales-0.9.38 app/views/educode_sales/recycles/business.json.jbuilder