When you want an optional belongs_to:


1) Just don't add in the field's migration
#migration_file_name.rb
#PLEASE DO NOT DO
null: false 

2) In the model use
#PLEASE DO
belongs_to :community, optional: true