User editing fixes

This commit is contained in:
Andrew Radev 2015-05-30 15:29:07 +03:00
parent 58354f66b2
commit e98a0c956c
2 changed files with 7 additions and 1 deletions

View File

@ -16,7 +16,7 @@ module Management
def edit
@user = find_user
@user.build_speaker_profile
@user.build_speaker_profile if @user.speaker_profile.blank?
end
def update

View File

@ -16,7 +16,13 @@
hr
.row
.col-lg-12
- speaker_profile = @user.speaker_profile
= 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
-# Required