Skip to content

Commit

Permalink
reverted to spree's "require_user" method (and hence avoids deprecate…
Browse files Browse the repository at this point in the history
…d form)
  • Loading branch information
paulcc committed May 6, 2009
1 parent 90dd9c8 commit d70b473
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions app/controllers/comments_controller.rb
Expand Up @@ -3,7 +3,7 @@ class CommentsController < ApplicationController
helper BlogEntriesHelper

# no comments without login first
before_filter :require_user_account, :only => [:new,:create]
before_filter :require_user, :only => [:new,:create]

def new
@blog = BlogEntry.find(params[:blog_entry_id])
Expand All @@ -28,12 +28,4 @@ def create
render :action => "new"
end
end

private
def require_user_account
return if logged_in?
store_location
redirect_to signup_path
end

end

0 comments on commit d70b473

Please sign in to comment.