Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Make name configurable

  • Loading branch information...
commit 122a79d99db476d9b3ba35ca884d10d639b07caa 1 parent 207ce05
@namelessjon authored
View
1  app.rb
@@ -15,6 +15,7 @@ class App < ::Sinatra::Base
:templates => ::File.join(self.root, 'black_book', 'templates'),
}
}
+ set :name, 'BlackBook'
helpers do
def addresses
View
2  black_book/views/layout.rb
@@ -6,7 +6,7 @@ class Layout < ::Mustache
self.template_extension = 'html'
def title
- 'Addresses!'
+ BlackBook::App.name
end
end
end
View
2  black_book/views/person.rb
@@ -4,7 +4,7 @@ module BlackBook
module Views
class Person < Layout
def title
- "#{name} - Addresses"
+ "#{name} - #{super}"
end
def name
Please sign in to comment.
Something went wrong with that request. Please try again.