Limit title/command to 255 chars

This commit is contained in:
Marcin Kulik 2015-04-20 10:43:37 +00:00
parent bf925c566d
commit 94c39b6441

View File

@ -54,6 +54,14 @@ class Asciicast < ActiveRecord::Base
collection collection
end end
def title=(value)
value ? super(value.strip[0...255]) : super
end
def command=(value)
value ? super(value.strip[0...255]) : super
end
def stdout def stdout
return @stdout if @stdout return @stdout if @stdout
@stdout = Stdout::Buffered.new(get_stdout) @stdout = Stdout::Buffered.new(get_stdout)