From 33025e00f7d42ec42f7af49f394d3e0d2eb9dd15 Mon Sep 17 00:00:00 2001 From: Marcin Kulik Date: Mon, 19 Nov 2012 22:29:46 +0100 Subject: [PATCH] AsciicastDecorator#terminal_type --- app/decorators/asciicast_decorator.rb | 4 ++++ app/views/asciicasts/show.html.erb | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/app/decorators/asciicast_decorator.rb b/app/decorators/asciicast_decorator.rb index f18b9f3..a65b136 100644 --- a/app/decorators/asciicast_decorator.rb +++ b/app/decorators/asciicast_decorator.rb @@ -64,6 +64,10 @@ class AsciicastDecorator < ApplicationDecorator end end + def terminal_type + asciicast.terminal_type || '?' + end + def shell File.basename(asciicast.shell.to_s) end diff --git a/app/views/asciicasts/show.html.erb b/app/views/asciicasts/show.html.erb index c5a1af0..712a7f6 100644 --- a/app/views/asciicasts/show.html.erb +++ b/app/views/asciicasts/show.html.erb @@ -51,7 +51,7 @@ SHELL: <%= @asciicast.shell %>
  • - TERM: <%= @asciicast.terminal_type || '?' %> + TERM: <%= @asciicast.terminal_type %>