From 40739523c2cd570459768e1fcda64ad9ed3f9d5d Mon Sep 17 00:00:00 2001 From: Andreas Stephanides Date: Sat, 3 Jan 2015 11:40:25 +0100 Subject: [PATCH 1/2] fix document typ --- app/models/document.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/models/document.rb b/app/models/document.rb index bf3714a..40fa2db 100644 --- a/app/models/document.rb +++ b/app/models/document.rb @@ -16,7 +16,7 @@ class Document < ActiveRecord::Base "document_"+self.id.to_s end def self.ether - EtherpadLite.connect('http://www.fet.at/etherpad', File.new('/home/andreas/www/APIKEY.txt')) + EtherpadLite.connect('http://www.fet.at/etherpad', File.new('/srv/etherpad/etherpad-lite/APIKEY.txt')) end def ether if @ep.nil? @@ -48,7 +48,7 @@ class Document < ActiveRecord::Base self.ep_group.pad(self.etherpadkey) end def ep_group - t= (self.typ.nil?) ? 1 : self.typ + t= (self.typ.nil? || self.typ ==0) ? 1 : self.typ Document.ether.group(Document::TYPS[t]) end searchable do From 70e34875f1542bc9cc109d09eddda84c779732fb Mon Sep 17 00:00:00 2001 From: Andreas Stephanides Date: Wed, 14 Jan 2015 09:11:09 +0100 Subject: [PATCH 2/2] search results fix --- app/views/home/_search_results.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/home/_search_results.html.erb b/app/views/home/_search_results.html.erb index dcfef1d..a1d0edd 100644 --- a/app/views/home/_search_results.html.erb +++ b/app/views/home/_search_results.html.erb @@ -13,4 +13,4 @@ <% end %> -<%= @res %> +<% @res %>