Airbnb Clone in rails #13 :: allow to publish with complete filling room data

this chapter we tells user to complete room data with add check mark 
if they doesn’t fill all form we not allow them publish listing

first add check icon to sidebar link open partial _room_menu.html.erb

paste code below

<span class="pull-right text-babu"><i class="fa fa-check"></i></span>

like in image


next we check if form is blank then hide check mark

we don’t check amenities field because allow to blank

ok pricing is blank let check mark is gone

next we add publish button for publish listing in public

save and refresh

if check mark doesn’t check completely then disable button

you remember before we already have active column in db

that use for set publish listing

next we add variable for check if all form isn’t blank

<% is_ready = ! && !@room.price.blank? && !@room.listing_name.blank? && ! && !@room.address.blank? %>

is_ready is true if all form not blank and we add to disabled attribute and swap value to false because disabled set to false

save and refresh

fix field require issue

if wee need to set form to blank

open that view wee allow to blank value