Skip to content
This repository has been archived by the owner on Mar 20, 2019. It is now read-only.

Commit

Permalink
Conflict fix.
Browse files Browse the repository at this point in the history
  • Loading branch information
M7 committed Apr 27, 2012
2 parents d2972b0 + 379f550 commit 7468a47
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 0 deletions.
8 changes: 8 additions & 0 deletions app/views/layouts/application.html.erb
Expand Up @@ -3,12 +3,17 @@
<head>
<meta charset='utf-8'>
<title>Whenbot</title>
<<<<<<< HEAD

=======

>>>>>>> 379f550bd4fac01f1cdbb65947c9f0f98a5d6ac7
<%= stylesheet_link_tag "application", :media => "all" %>
<%= javascript_include_tag "application" %>
<%= csrf_meta_tags %>
</head>
<body>
<<<<<<< HEAD
<div class="navbar navbar-fixed-top">
<div class="navbar-inner">
<div class="container">
Expand Down Expand Up @@ -47,6 +52,9 @@
<div class="container">
<%= render 'layouts/notice' unless notice.blank? %>
<%= yield %>
=======
<small>♥ WHENBOT LOVES YOU ♥</small>
>>>>>>> 379f550bd4fac01f1cdbb65947c9f0f98a5d6ac7
</div>
</body>
</html>
3 changes: 3 additions & 0 deletions config/application.rb
Expand Up @@ -15,6 +15,9 @@ class Application < Rails::Application
# Application configuration should go into files in config/initializers
# -- all .rb files in that directory are automatically loaded.

# Add the X-who-loves-you header to all requests
config.middleware.use 'AddLove'

# Custom directories with classes and modules you want to be autoloadable.
config.autoload_paths += Dir["#{config.root}/lib"]
# Was: config.autoload_paths += Dir["#{config.root}/lib", "#{config.root}/lib/**/"]
Expand Down
11 changes: 11 additions & 0 deletions config/initializers/add_love.rb
@@ -0,0 +1,11 @@
class AddLove
def initialize(app)
@app = app
end

def call(env)
status, headers, response = @app.call(env)
headers["X-Who-Loves-You"] = 'whenbot'
[status, headers, response.body]
end
end

0 comments on commit 7468a47

Please sign in to comment.