To Examples

RealEstate Example

Directions

  1. Create new Rails project named RealEstate.
  2. Generate a scaffold named RealEstateListing with these fields:
    Field Datatype
    address string
    city string
    property_type string
    price integer
    bedrooms integer
    bathrooms integer
    size integer
    year integer
  3. Source code for seed file: seeds.rb
  4. Source code for index view: index.html.erb
  5. Source code for model: real_estate_listing.rb
  6. Source code for SCSS stylesheet: real_estate_listings.scss
  7. Run the seed file and view the index view with this URL:
    http://localhost:3000/real_estate_listings