Module: EducodeSales::SubjectHelper
- Included in:
- EducodeSales, BusinessCoursesController
- Defined in:
- app/helpers/educode_sales/subject_helper.rb
Instance Method Summary collapse
- #manges(item) ⇒ Object
- #school_name(item) ⇒ Object
-
#staffs(item) ⇒ Object
def b_name(item) item.business ? item.business.name : ” end.
- #status(d) ⇒ Object
Instance Method Details
#manges(item) ⇒ Object
26 27 28 |
# File 'app/helpers/educode_sales/subject_helper.rb', line 26 def manges(item) item.business ? item.business.business_deliver_subjects.take.subject_manages : item.manges_name end |
#school_name(item) ⇒ Object
9 10 11 |
# File 'app/helpers/educode_sales/subject_helper.rb', line 9 def school_name(item) item.business ? item.business.school.name : item.school_name end |
#staffs(item) ⇒ Object
def b_name(item)
item.business ? item.business.name : ''
end
22 23 24 |
# File 'app/helpers/educode_sales/subject_helper.rb', line 22 def staffs(item) item.business ? item.business.staff.name : item.staffs_name end |
#status(d) ⇒ Object
5 6 7 |
# File 'app/helpers/educode_sales/subject_helper.rb', line 5 def status(d) d.public == 2 ? "已公开" : d.public == 1 ? "待审核" : d.status == 2 ? "已发布" : "编辑中" end |