A: 

Some highlights

  1. Use Authlogic
    • In your Review Controller, say something like before_filter :require_user_before_reviews
    • In require_user_before_reviews do something like

/app/controllers/reviews_controller.rb

  def require_user_before_reviews
    return true if logged_in?
    session[:review_params] = params[:review]
    session[:return_url] = new_review_path
    redirect_to login_path
  end

Then re-render the form on new_review_path with the session value after logged in.

There's some broad strokes in there, but that should work.

As a note: as a User, I'd want you to ask me to login before I do the review.

Jesse Wolgamott
Thanks for the reply! But it's not working as is: the log mentions "Redirected to http://localhost:3000/login", "Filter chain halted as [:require_user_before_comments] rendered_or_redirected." and the login view is not displayed... can't find out how to solve this problem :( Any clue?
alex
sounds like maybe require_user_before_comments is occurring in the application_controller? If not, try logging inside require_user_before_reviews to see when it's being called. It should only be called once.
Jesse Wolgamott