Skip to content

Commit

Permalink
Removed necessary sessions.
Browse files Browse the repository at this point in the history
  • Loading branch information
Julian Connor committed Aug 7, 2012
1 parent 68e93fb commit 8b240bb
Show file tree
Hide file tree
Showing 8 changed files with 4 additions and 30 deletions.
1 change: 1 addition & 0 deletions Gemfile.lock
Expand Up @@ -166,6 +166,7 @@ DEPENDENCIES
haml
json
mongrel
nokogiri
omniauth
pg (~> 0.11.0)
rails (= 3.0.0)
Expand Down
Binary file removed app/.DS_Store
Binary file not shown.
8 changes: 0 additions & 8 deletions app/controllers/charts_controller.rb
@@ -1,15 +1,7 @@
class ChartsController < ApplicationController
#attr_accessible
before_filter :authenticate
load_and_authorize_resource :only => [:index]
# GET /charts
# GET /charts.xml
def authenticate
if !current_user
flash[:error] = "You must log in to see that page."
redirect_to root_path
end
end

def snippet(title, wordcount)
title.split[0..(wordcount-1)].join(" ") + (title.split.size > wordcount ? "..." : "")
Expand Down
12 changes: 3 additions & 9 deletions app/controllers/home_controller.rb
Expand Up @@ -5,16 +5,10 @@

class HomeController < ApplicationController

before_filter :authenticate

def authenticate
if !current_user
flash[:error] = "You must log in to see that page."
redirect_to :controller => "sessions", :action => "index"
end
end

def index
respond_to do |format|
format.html
end
end

def playtrack
Expand Down
13 changes: 0 additions & 13 deletions app/views/layouts/application.html.erb
Expand Up @@ -35,7 +35,6 @@
</head>
<body>
<div class="top_background"></div>
<% if current_user %>
<div class="alert">
<%= render 'layouts/flash', :locals => {:flash => flash} %>
</div>
Expand All @@ -44,18 +43,9 @@
<div class="logo">
<a href="/"><%= image_tag('myvolume-logo.png') %></a>
</div>
<ul class="secondary-nav">
<li class="avatar"><img src="<%= avatar_url(current_user) %>" height="26px"/></li>
<li><a href="#"><%= proper_name(current_user) %></a></li>
<li><a href="/log_out">Log Out</a></li>
</ul>
</div>
</div>
<% end %>

<% if current_user %>
<div id="content" class="container clearfix">
<div id="charts"></div>
<div id="songs"></div>
Expand Down Expand Up @@ -90,9 +80,6 @@
</div>
</div>
</div>
<% else %>
<div id="content" class="container clearfix"><%= yield %></div>
<% end %>

</body>

Expand Down
Binary file added public/images/glyphicons-halflings.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/images/page-next.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/images/page-prev.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 8b240bb

Please sign in to comment.