6. gem ‘devise’
# read and follow documentation
# https://github.com/plataformatec/devise
# rails c
# User.create(email: "udnpico@gmail.com", password:
"rahasia")
GEMFILE
7. ¡ Hide navigation link if user not sign in
¡ Add logout link
¡ Show user full name on login page header
¡ User can login using username (optional)
CHALLENGE
8. ¡ User : username, full_name
¡ Property : name, description, address, searcable, cost, tax,
currency, user_id
¡ Enquiry : property_id, checkin, checkout, number_of_guests,
reserved_at, booked_at, expired_at, completed_at,
reference_number, number_of_adults, number_of_children,
number_of_infants, total_cost, tax, currency, user_id
¡ Customer < User : type = Customer
¡ Partner < User : type = Partner
¡ Message : enquiry_id, from, to, subject, body, message_at
¡ Payment : enquiry_id, amount, currency, payment_at
MODEL