diff options
-rw-r--r-- | app/controllers/xrd_controller.rb | 6 | ||||
-rw-r--r-- | app/views/auth/registrations/edit.html.haml | 2 |
2 files changed, 8 insertions, 0 deletions
diff --git a/app/controllers/xrd_controller.rb b/app/controllers/xrd_controller.rb index e00485f5e..159a954b3 100644 --- a/app/controllers/xrd_controller.rb +++ b/app/controllers/xrd_controller.rb @@ -1,4 +1,6 @@ class XrdController < ApplicationController + before_action :set_default_format + def host_meta @webfinger_template = "#{webfinger_url}?resource={uri}" @@ -22,6 +24,10 @@ class XrdController < ApplicationController private + def set_default_format + request.format = 'json' if request.headers["HTTP_ACCEPT"].nil? && params[:format].nil? + end + def username_from_resource if resource_param.start_with?('acct:') || resource_param.include?('@') resource_param.split('@').first.gsub('acct:', '') diff --git a/app/views/auth/registrations/edit.html.haml b/app/views/auth/registrations/edit.html.haml index 78f4ef5dc..567f0ea44 100644 --- a/app/views/auth/registrations/edit.html.haml +++ b/app/views/auth/registrations/edit.html.haml @@ -5,6 +5,8 @@ = devise_error_messages! .field + = f.email_field :email, placeholder: 'E-mail address' + .field = f.password_field :password, autocomplete: "off", placeholder: 'New password' .field = f.password_field :password_confirmation, autocomplete: "off", placeholder: 'Confirm new password' |