video: title limit 30

dev_unstable
p31729568 6 years ago
parent a791e2576d
commit f105c938af

@ -21,7 +21,14 @@ class Videos::CreateAuthService < ApplicationService
private
def title
@_title ||= params.delete(:title).to_s.strip
@_title ||= begin
str = params.delete(:title).to_s.strip
if str.length > 30
"#{str[0, 15]}...#{str.reverse[0,10].reverse}"
else
str
end
end
end
def filename

Loading…
Cancel
Save