From 785665b9ad2f39231cd6e090a570a4cbfba64240 Mon Sep 17 00:00:00 2001 From: Steffen van Bergerem Date: Sun, 7 Feb 2016 13:32:44 +0100 Subject: [PATCH] Fix mobile registration layout after failed registration closes #6677 --- Changelog.md | 1 + app/controllers/registrations_controller.rb | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/Changelog.md b/Changelog.md index dd763cecd..f4942b8a5 100644 --- a/Changelog.md +++ b/Changelog.md @@ -9,6 +9,7 @@ * Fix plural rules handling more than wanted as "one" [#6630](https://github.com/diaspora/diaspora/pull/6630) * Fix `suppress_annoying_errors` eating too much errors [#6653](https://github.com/diaspora/diaspora/pull/6653) * Ensure the rubyzip gem is properly loaded [#6659](https://github.com/diaspora/diaspora/pull/6659) +* Fix mobile registration layout after failed registration [#6677](https://github.com/diaspora/diaspora/pull/6677) ## Features * Keyboard shortcuts now do work on profile pages as well [#6647](https://github.com/diaspora/diaspora/pull/6647/files) diff --git a/app/controllers/registrations_controller.rb b/app/controllers/registrations_controller.rb index 4697592fb..8b816e390 100644 --- a/app/controllers/registrations_controller.rb +++ b/app/controllers/registrations_controller.rb @@ -22,7 +22,7 @@ class RegistrationsController < Devise::RegistrationsController flash.now[:error] = @user.errors.full_messages.join(" - ") logger.info "event=registration status=failure errors='#{@user.errors.full_messages.join(', ')}'" - render :action => 'new', :layout => 'with_header' + render action: "new", layout: request.format == :mobile ? "application" : "with_header" end end