Merge branch 'develop' into dev_aliyun

dev_winse
daiao 6 years ago
commit 2da180fdcc

@ -0,0 +1,3 @@
class Partner < ApplicationRecord
has_many :users
end

@ -138,6 +138,9 @@ class User < ApplicationRecord
# 视频 # 视频
has_many :videos, dependent: :destroy has_many :videos, dependent: :destroy
# 客户管理
belongs_to :partner
# Groups and active users # Groups and active users
scope :active, lambda { where(status: STATUS_ACTIVE) } scope :active, lambda { where(status: STATUS_ACTIVE) }

@ -16,6 +16,9 @@ json.top do
json.moop_cases_url "#{@old_domain}/moop_cases" json.moop_cases_url "#{@old_domain}/moop_cases"
json.crowdsourcing_url "/crowdsourcing" json.crowdsourcing_url "/crowdsourcing"
# 客户管理
json.customer_management_url "#{@old_domain}/cooperates/#{current_user.partner.try(:id)}/partner_list" if current_user.partner
json.career_url do json.career_url do
json.array! @career.to_a do |c| json.array! @career.to_a do |c|
if c[1].present? if c[1].present?

@ -0,0 +1,5 @@
require 'rails_helper'
RSpec.describe Partner, type: :model do
pending "add some examples to (or delete) #{__FILE__}"
end
Loading…
Cancel
Save