Skip to content
Browse files

Make site_name a variable since it's used for more than once.

  • Loading branch information...
1 parent 804eba3 commit 0a9922fe8f15d47a2789f1f1b4724e1db3ecaa91 @fredwu committed
Showing with 5 additions and 4 deletions.
  1. +3 −2 app/controllers/heroes.rb
  2. +2 −2 app/views/layouts/application.html.slim
View
5 app/controllers/heroes.rb
@@ -1,7 +1,8 @@
RubyCommitters.controllers :heroes do
get :index, :map => '/' do
- @heroes = Hero.all
- @attrs = {
+ @site_name = RubyCommitters.site_name
+ @heroes = Hero.all
+ @attrs = {
'names' => 'names',
'nicks' => 'a.k.a.',
'sites' => 'sites',
View
4 app/views/layouts/application.html.slim
@@ -1,7 +1,7 @@
! doctype html
html
head
- title= RubyCommitters.site_name
+ title= @site_name
link rel="canonical" href="http://rubycommitters.org/"
== favicon_tag 'favicon.png'
== stylesheet_link_tag :base
@@ -12,7 +12,7 @@ html
#header-wrapper
#inner-wrapper
#header
- h1#logo= RubyCommitters.site_name
+ h1#logo= @site_name
p#ruby-link== link_to 'Visit the official Ruby website', 'http://www.ruby-lang.org/'
#crowd-header
#crowd-header-strip

0 comments on commit 0a9922f

Please sign in to comment.
Something went wrong with that request. Please try again.