Class: AlbumOrigin
- Inherits:
-
ActiveRecord::Base
- Object
- ActiveRecord::Base
- AlbumOrigin
show all
- Extended by:
- AlbumExtender
- Defined in:
- lib/ting_model/album_origin.rb
Direct Known Subclasses
Album, Album0, Album1, Album10, Album11, Album12, Album13, Album14, Album15, Album16, Album17, Album18, Album19, Album2, Album20, Album21, Album22, Album23, Album24, Album25, Album26, Album27, Album28, Album29, Album3, Album30, Album31, Album32, Album33, Album34, Album35, Album36, Album37, Album38, Album39, Album4, Album40, Album41, Album42, Album43, Album44, Album45, Album46, Album47, Album48, Album49, Album5, Album50, Album51, Album52, Album53, Album54, Album55, Album56, Album57, Album58, Album59, Album6, Album60, Album61, Album62, Album63, Album64, Album65, Album66, Album67, Album68, Album69, Album7, Album70, Album71, Album72, Album73, Album74, Album75, Album76, Album77, Album78, Album79, Album8, Album80, Album81, Album82, Album83, Album84, Album85, Album86, Album87, Album88, Album89, Album9, Album90, Album91, Album92, Album93, Album94, Album95, Album96, Album97, Album98, Album99
Instance Method Summary
collapse
decr_user_albums_count, next_id
Instance Method Details
#is_crawler_disp ⇒ Object
128
129
130
131
132
133
134
135
|
# File 'lib/ting_model/album_origin.rb', line 128
def is_crawler_disp
case self.is_crawler
when true
'爬虫'
when false
'用户'
end
end
|
#is_publish_disp ⇒ Object
106
107
108
109
110
111
112
113
114
115
|
# File 'lib/ting_model/album_origin.rb', line 106
def is_publish_disp
case self.is_publish
when true
'审核通过'
when false
'审核不通过'
else
'审核通过'
end
end
|
#to_topic_hash ⇒ Object
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
|
# File 'lib/ting_model/album_origin.rb', line 80
def to_topic_hash
{
created_at: self.created_at,
updated_at: self.updated_at,
id: self.id,
uid: self.uid,
nickname: self.nickname,
avatar_path: self.avatar_path,
is_v: self.is_v,
human_category_id: self.human_category_id,
is_public: self.is_public,
is_publish: self.is_publish,
user_source: self.user_source,
category_id: self.category_id,
tags: self.tags,
title: self.title,
intro: self.intro,
cover_path: self.cover_path,
music_category: self.music_category,
is_deleted: self.is_deleted,
status: self.status,
dig_status: self.dig_status,
extra_tags: self.
}
end
|
#user_source_disp ⇒ Object
117
118
119
120
121
122
123
124
125
126
|
# File 'lib/ting_model/album_origin.rb', line 117
def user_source_disp
case user_source
when 1
'原创'
when 2
'采集'
else
''
end
end
|