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
-
Domizio Demichelis September 29th, 2010 @ 05:22 PM
- State changed from new to open
- Milestone set to Hobo 1.3 (Rails 3)
- Assigned user set to Domizio Demichelis
- Milestone order changed from 197890 to 0
-
Domizio Demichelis September 29th, 2010 @ 05:32 PM
- State changed from open to resolved
fixed in 86f973a7
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.
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »