User editing fixes
This commit is contained in:
parent
58354f66b2
commit
e98a0c956c
|
@ -16,7 +16,7 @@ module Management
|
||||||
|
|
||||||
def edit
|
def edit
|
||||||
@user = find_user
|
@user = find_user
|
||||||
@user.build_speaker_profile
|
@user.build_speaker_profile if @user.speaker_profile.blank?
|
||||||
end
|
end
|
||||||
|
|
||||||
def update
|
def update
|
||||||
|
|
|
@ -16,7 +16,13 @@
|
||||||
hr
|
hr
|
||||||
.row
|
.row
|
||||||
.col-lg-12
|
.col-lg-12
|
||||||
|
- speaker_profile = @user.speaker_profile
|
||||||
|
|
||||||
= f.simple_fields_for :speaker_profile do |ff|
|
= f.simple_fields_for :speaker_profile do |ff|
|
||||||
|
- if speaker_profile.picture.present?
|
||||||
|
.col-sm-offset-3.col-sm-9
|
||||||
|
= image_tag speaker_profile.picture.medium.url, class: 'img-thumbnail'
|
||||||
|
|
||||||
= ff.input :picture, wrapper: :horizontal_file_input
|
= ff.input :picture, wrapper: :horizontal_file_input
|
||||||
|
|
||||||
-# Required
|
-# Required
|
||||||
|
|
Loading…
Reference in New Issue