diff --git a/app/models/asciicast.rb b/app/models/asciicast.rb index 24a27a2..e91a99c 100644 --- a/app/models/asciicast.rb +++ b/app/models/asciicast.rb @@ -54,6 +54,14 @@ class Asciicast < ActiveRecord::Base collection 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 return @stdout if @stdout @stdout = Stdout::Buffered.new(get_stdout)