diff options
author | Eugen Rochko <eugen@zeonfederated.com> | 2017-04-02 04:10:22 +0200 |
---|---|---|
committer | Eugen Rochko <eugen@zeonfederated.com> | 2017-04-02 04:13:22 +0200 |
commit | 433cb198fa930344c7352250dfaae9857f7ba471 (patch) | |
tree | d755bc4e1ac329ab2fc8bca489ebff0f122c0c65 /app | |
parent | 3ffa27e8129ade27f4f02d462aeab366a1e06b0b (diff) |
Fix landing page sign up form ignoring username field
Diffstat (limited to 'app')
-rw-r--r-- | app/controllers/about_controller.rb | 3 | ||||
-rw-r--r-- | app/views/about/index.html.haml | 2 |
2 files changed, 4 insertions, 1 deletions
diff --git a/app/controllers/about_controller.rb b/app/controllers/about_controller.rb index 491036db2..abf4b7df4 100644 --- a/app/controllers/about_controller.rb +++ b/app/controllers/about_controller.rb @@ -5,6 +5,9 @@ class AboutController < ApplicationController def index @description = Setting.site_description + + @user = User.new + @user.build_account end def more diff --git a/app/views/about/index.html.haml b/app/views/about/index.html.haml index be5e406c5..fdfb2b916 100644 --- a/app/views/about/index.html.haml +++ b/app/views/about/index.html.haml @@ -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') } |