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 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

View File

@ -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