diff options
author | David Cabo <david@calibea.com> | 2011-08-11 03:50:10 +0200 |
---|---|---|
committer | David Cabo <david@calibea.com> | 2011-08-11 03:50:10 +0200 |
commit | a63e598b9e0ddfa7ac695b1be41aaace6c0eb628 (patch) | |
tree | ac5ec3bca43d8194445292190c74124f1a0a8429 /app/controllers/user_controller.rb | |
parent | 07933c860cea05df05acde5b5e321e2d78911f60 (diff) |
Move log-in point to before Preview and fix modal sign-in and sign-up redirects
Diffstat (limited to 'app/controllers/user_controller.rb')
-rw-r--r-- | app/controllers/user_controller.rb | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/app/controllers/user_controller.rb b/app/controllers/user_controller.rb index 3dcdf973b..3e3913fae 100644 --- a/app/controllers/user_controller.rb +++ b/app/controllers/user_controller.rb @@ -109,7 +109,7 @@ class UserController < ApplicationController session[:user_circumstance] = nil session[:remember_me] = params[:remember_me] ? true : false - if @is_modal_dialog + if is_modal_dialog render :action => 'signin_successful' else do_post_redirect @post_redirect @@ -507,10 +507,13 @@ class UserController < ApplicationController private + def is_modal_dialog + (params[:modal].to_i != 0) + end + # when logging in through a modal iframe, don't display chrome around the content def select_layout - @is_modal_dialog = (params[:modal].to_i != 0) - @is_modal_dialog ? 'no_chrome' : 'default' + is_modal_dialog ? 'no_chrome' : 'default' end # Decide where we are going to redirect back to after signin/signup, and record that |