Class: SubAppRecommend

Inherits:
ActiveRecord::Base
  • Object
show all
Defined in:
lib/subapp_model/sub_app_recommend.rb

Instance Method Summary collapse

Instance Method Details

#channel_dispObject



21
22
23
24
25
26
27
28
29
30
# File 'lib/subapp_model/sub_app_recommend.rb', line 21

def channel_disp
  case self.channel
    when 1
      "应用推荐"
    when 2
      "Feed广告"
    else
      ""
  end
end

#column_type_dispObject



43
44
45
46
47
48
49
50
51
52
53
54
# File 'lib/subapp_model/sub_app_recommend.rb', line 43

def column_type_disp
  case self.column_type
    when 1
      "今日推荐"
    when 2
      "热门推荐"
    when 3
      "装机必备"
    else
      ""
  end
end

#is_deleted_dispObject



32
33
34
35
36
37
38
39
40
41
# File 'lib/subapp_model/sub_app_recommend.rb', line 32

def is_deleted_disp
  case self.is_deleted
    when true
      ""
    when false
      ""
    else
      ""
  end
end

#terminal_dispObject



10
11
12
13
14
15
16
17
18
19
# File 'lib/subapp_model/sub_app_recommend.rb', line 10

def terminal_disp
  case self.terminal
    when 1
      "ios"
    when 2
      "android"
    else
      ""
  end
end