#799 ✓resolved
Tomoaki Hayasaka

global site name is overwritten with subsite name by app_name

Reported by Tomoaki Hayasaka | September 25th, 2010 @ 11:13 AM | in Hobo 1.3 (Rails 3)

I use Hobo 1.3pre6 + Rails 3.0.

In app_name helper function, String#<< is used on Rails.application.config.hobo.app_name to append subsite name and it is destructive operation. This makes application name longer each time app_name is called.

To fix this, consider cloning the string before appending, or use String#+.

diff --git a/hobo/lib/hobo/helper.rb b/hobo/lib/hobo/helper.rb
index 744e3e9..1a22249 100644
--- a/hobo/lib/hobo/helper.rb
+++ b/hobo/lib/hobo/helper.rb
@@ -112,7 +112,7 @@ module Hobo
 
     def app_name(add_subsite=true)
       an = Rails.application.config.hobo.app_name
-      an << " - #{subsite.titleize}" if add_subsite && subsite
+      an = an + " - #{subsite.titleize}" if add_subsite && subsite
       an
     end

Comments and changes to this ticket

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

People watching this ticket

Tags

Pages