#1040 Show email in public option
This commit is contained in:
parent
a0120734e3
commit
56c69f51b7
5 changed files with 10 additions and 4 deletions
|
|
@ -24,7 +24,7 @@ class RegistrationsController < Devise::RegistrationsController
|
|||
def configure_permitted_parameters
|
||||
devise_parameter_sanitizer.for(:account_update) do |u|
|
||||
u.
|
||||
permit(:email, :password, :password_confirmation, :current_password, :username)
|
||||
permit(:email, :password, :password_confirmation, :current_password, :username, :email_public)
|
||||
end
|
||||
devise_parameter_sanitizer.for(:sign_up) do |u|
|
||||
u.
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@
|
|||
= semantic_form_for(resource, as: resource_name, url: registration_path(resource_name), html: { method: :put }) do |f|
|
||||
= f.input :username, required: false, input_html: { autocomplete: 'off' }
|
||||
= f.input :email, required: false, input_html: { autocomplete: 'off' }
|
||||
= f.input :email_public
|
||||
= f.input :password, hint: "(Leave blank if you don't want to change it)", input_html: { autocomplete: 'off' }
|
||||
= f.input :password_confirmation, input_html: { autocomplete: 'off' }
|
||||
= f.inputs name: 'OpenID' do
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@
|
|||
%h3
|
||||
by
|
||||
= link_to @speaker.name, user_path(@speaker.id)
|
||||
= "(#{@speaker.email})"
|
||||
= "(#{@speaker.email})" if @speaker.email_public
|
||||
- if @speaker.affiliation?
|
||||
%br
|
||||
%span.muted
|
||||
|
|
|
|||
|
|
@ -0,0 +1,5 @@
|
|||
class ChangeEmailPublicFromUsers < ActiveRecord::Migration
|
||||
def change
|
||||
change_column_default :users, :email_public, true
|
||||
end
|
||||
end
|
||||
|
|
@ -11,7 +11,7 @@
|
|||
#
|
||||
# It's strongly recommended that you check this file into your version control system.
|
||||
|
||||
ActiveRecord::Schema.define(version: 20170129075434) do
|
||||
ActiveRecord::Schema.define(version: 20170213145807) do
|
||||
|
||||
create_table "ahoy_events", force: :cascade do |t|
|
||||
t.uuid "visit_id", limit: 16
|
||||
|
|
@ -482,7 +482,7 @@ ActiveRecord::Schema.define(version: 20170129075434) do
|
|||
t.datetime "created_at"
|
||||
t.datetime "updated_at"
|
||||
t.string "name"
|
||||
t.boolean "email_public"
|
||||
t.boolean "email_public", default: true
|
||||
t.text "biography"
|
||||
t.string "nickname"
|
||||
t.string "affiliation"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue