Permalink
Browse files

Improve sizing of result text box

  • Loading branch information...
1 parent 91bcfc4 commit 0db654674b44694e3af8e4a58c2e5cff70ee902c @dam5s committed Nov 13, 2012
Showing with 2 additions and 1 deletion.
  1. +1 −0 app.rb
  2. +1 −1 views/result.haml
View
1 app.rb
@@ -21,6 +21,7 @@ def to_oc
begin
@result = JSON.parse(@json).to_oc
+ @line_count = @result.split("\n").size
haml :result
rescue
haml :error
View
@@ -2,4 +2,4 @@
%textarea{name: 'json', id: 'json'}=@json
%input{type: 'submit', value: 'Convert!'}
-%textarea{name: 'result', id: 'result'}=@result
+%textarea{name: 'result', id: 'result', rows:@line_count}=@result

0 comments on commit 0db6546

Please sign in to comment.