]> cat aescling's git repositories - mastodon.git/commitdiff
Fix landing page sign up form ignoring username field
authorEugen Rochko <eugen@zeonfederated.com>
Sun, 2 Apr 2017 02:10:22 +0000 (04:10 +0200)
committerEugen Rochko <eugen@zeonfederated.com>
Sun, 2 Apr 2017 02:13:22 +0000 (04:13 +0200)
app/controllers/about_controller.rb
app/views/about/index.html.haml

index 491036db2831b4c807024b8e56cbed6cf6c2b2ef..abf4b7df4ca1b4a36a71de499b47164b3032d35e 100644 (file)
@@ -5,6 +5,9 @@ class AboutController < ApplicationController
 
   def index
     @description = Setting.site_description
+
+    @user = User.new
+    @user.build_account
   end
 
   def more
index be5e406c57b102d52f3d29962c57dcb0b0d95f8c..fdfb2b916f1b56362dd13d4c2c5034b5d73567ec 100644 (file)
@@ -24,7 +24,7 @@
   .screenshot-with-signup
     .mascot= image_tag 'fluffy-elephant-friend.png'
 
-    = simple_form_for(:user, url: user_registration_path) do |f|
+    = simple_form_for(@user, url: user_registration_path) do |f|
       = f.simple_fields_for :account do |ff|
         = ff.input :username, autofocus: true, placeholder: t('simple_form.labels.defaults.username'), required: true, input_html: { 'aria-label' => t('simple_form.labels.defaults.username') }