Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Changed before_filter on all controllers to require login. No users s…

…ignup, only allowing login right now.
  • Loading branch information...
commit 8769dccad919c8e72148c3dd2cd92ca0053a0e95 1 parent 94ff1b8
@robertmilner authored
View
1  app/controllers/excuses_controller.rb
@@ -1,6 +1,7 @@
class ExcusesController < ApplicationController
# filters
+ before_filter :require_login
before_filter :current_user
# GET /excuses
View
1  app/controllers/favorites_controller.rb
@@ -1,6 +1,7 @@
class FavoritesController < ApplicationController
# filters
+ before_filter :require_login
before_filter :current_user
# GET /favorites
View
5 app/controllers/locations_controller.rb
@@ -1,4 +1,9 @@
class LocationsController < ApplicationController
+
+ # filters
+ before_filter :require_login
+ before_filter :current_user
+
# GET /locations
# GET /locations.json
def index
View
2  app/controllers/pages_controller.rb
@@ -1,7 +1,7 @@
class PagesController < ApplicationController
# setting the current user if there is one
- before_filter :require_login, :only => :user
+ before_filter :require_login, :only => [:favorite, :user]
before_filter :current_user
def excuse
View
5 app/controllers/searches_controller.rb
@@ -1,4 +1,9 @@
class SearchesController < ApplicationController
+
+ # filters
+ before_filter :require_login, :except => [:new, :create]
+ before_filter :current_user
+
# GET /searches
# GET /searches.json
def index
View
3  app/controllers/sessions_controller.rb
@@ -1,5 +1,8 @@
class SessionsController < ApplicationController
+ # filters
+ before_filter :require_login, :except => [:new, :create]
+
def new
end
View
5 app/controllers/users_controller.rb
@@ -1,4 +1,9 @@
class UsersController < ApplicationController
+
+ # filters
+ before_filter :require_login
+ before_filter :current_user
+
# GET /users
# GET /users.json
def index
Please sign in to comment.
Something went wrong with that request. Please try again.