From fd1d0ccc1edaa50b982d30b9996e72a752067403 Mon Sep 17 00:00:00 2001 From: Alexey Verkhovsky Date: Sun, 13 Feb 2005 15:57:58 +0000 Subject: [PATCH] Better readability for URL generation methods in web.rb --- app/models/web.rb | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/app/models/web.rb b/app/models/web.rb index efe903e3..03412e46 100644 --- a/app/models/web.rb +++ b/app/models/web.rb @@ -87,16 +87,16 @@ class Web link = CGI.escape(name) case mode when :export - if has_page?(name) then "#{text}" - else "#{text}" end + if has_page?(name) then %{#{text}} + else %{#{text}} end when :publish - if has_page?(name) then "#{text}" - else "#{text}" end + if has_page?(name) then %{#{text}} + else %{#{text}} end else if has_page?(name) - "#{text}" + %{#{text}} else - "#{text}?" + %{#{text}?} end end end @@ -105,14 +105,14 @@ class Web link = CGI.escape(name) case mode when :export - if has_file?(name) then "\"#{text}\"" - else "\"#{text}\"" end + if has_file?(name) then %{#{text}} + else %{#{text}} end when :publish - if has_file?(name) then "\"#{text}\"" - else "#{text}" end + if has_file?(name) then %{#{text}} + else %{#{text}} end else - if has_file?(name) then "\"#{text}\"" - else "#{text}?" end + if has_file?(name) then %{#{text}} + else %{#{text}?} end end end