# If nested attribute is blank

**URL:** <https://www.ruby-forum.com/t/if-nested-attribute-is-blank/193961>\
**Category:** Rails\
**Created:** [August 27, 2010, 7:47am UTC](https://www.ruby-forum.com/t/if-nested-attribute-is-blank/193961 "2010-08-27T07:47:17Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![sunfish](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/96bed5/32.png) [@sunfish](https://www.ruby-forum.com/u/sunfish)\
**Post date:** [August 27, 2010, 7:47am UTC](https://www.ruby-forum.com/t/if-nested-attribute-is-blank/193961/1 "2010-08-27T07:47:17Z")

</div>

HI,

I need to know if any nested attributes is blank then how it would work?  
e.g -  
In my case user have addresses & photos(nested attributes) but not  
mandatory while adding user if i haven’t added photos & submit form  
then while editing that user it will not shown me photo upload field  
because photo object is not exist for that user

can you explain me how should it work?
