Skip to content

Commit

Permalink
Clean up as we don't need to call render_with_scope anymore.
Browse files Browse the repository at this point in the history
  • Loading branch information
josevalim committed Jan 2, 2012
1 parent d9df632 commit 66b93e8
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 14 deletions.
3 changes: 1 addition & 2 deletions app/controllers/devise/confirmations_controller.rb
Expand Up @@ -2,7 +2,6 @@ class Devise::ConfirmationsController < DeviseController
# GET /resource/confirmation/new
def new
build_resource({})
render :new
end

# POST /resource/confirmation
Expand All @@ -12,7 +11,7 @@ def create
if successfully_sent?(resource)
respond_with({}, :location => after_resending_confirmation_instructions_path_for(resource_name))
else
respond_with_navigational(resource){ render :new }
respond_with(resource)
end
end

Expand Down
6 changes: 2 additions & 4 deletions app/controllers/devise/passwords_controller.rb
Expand Up @@ -4,7 +4,6 @@ class Devise::PasswordsController < DeviseController
# GET /resource/password/new
def new
build_resource({})
render :new
end

# POST /resource/password
Expand All @@ -14,15 +13,14 @@ def create
if successfully_sent?(resource)
respond_with({}, :location => after_sending_reset_password_instructions_path_for(resource_name))
else
respond_with_navigational(resource){ render :new }
respond_with(resource)
end
end

# GET /resource/password/edit?reset_password_token=abcdef
def edit
self.resource = resource_class.new
resource.reset_password_token = params[:reset_password_token]
render :edit
end

# PUT /resource/password
Expand All @@ -35,7 +33,7 @@ def update
sign_in(resource_name, resource)
respond_with resource, :location => after_sign_in_path_for(resource)
else
respond_with_navigational(resource){ render :edit }
respond_with resource
end
end

Expand Down
10 changes: 5 additions & 5 deletions app/controllers/devise/registrations_controller.rb
Expand Up @@ -5,7 +5,7 @@ class Devise::RegistrationsController < DeviseController
# GET /resource/sign_up
def new
resource = build_resource({})
respond_with_navigational(resource){ render :new }
respond_with resource
end

# POST /resource
Expand All @@ -23,8 +23,8 @@ def create
respond_with resource, :location => after_inactive_sign_up_path_for(resource)
end
else
clean_up_passwords(resource)
respond_with_navigational(resource) { render :new }
clean_up_passwords resource
respond_with resource
end
end

Expand All @@ -49,8 +49,8 @@ def update
sign_in resource_name, resource, :bypass => true
respond_with resource, :location => after_update_path_for(resource)
else
clean_up_passwords(resource)
respond_with_navigational(resource){ render :edit }
clean_up_passwords resource
respond_with resource
end
end

Expand Down
2 changes: 1 addition & 1 deletion app/controllers/devise/sessions_controller.rb
Expand Up @@ -6,7 +6,7 @@ class Devise::SessionsController < DeviseController
def new
resource = build_resource
clean_up_passwords(resource)
respond_with_navigational(resource, stub_options(resource)){ render :new }
respond_with(resource, stub_options(resource))
end

# POST /resource/sign_in
Expand Down
3 changes: 1 addition & 2 deletions app/controllers/devise/unlocks_controller.rb
Expand Up @@ -4,7 +4,6 @@ class Devise::UnlocksController < DeviseController
# GET /resource/unlock/new
def new
build_resource({})
render :new
end

# POST /resource/unlock
Expand All @@ -14,7 +13,7 @@ def create
if successfully_sent?(resource)
respond_with({}, :location => new_session_path(resource_name))
else
respond_with_navigational(resource){ render :new }
respond_with(resource)
end
end

Expand Down

0 comments on commit 66b93e8

Please sign in to comment.