To Examples
RealEstate Example
Directions
Create new Rails project named RealEstate.
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
Source code for seed file:
seeds.rb
Source code for index view:
index.html.erb
Source code for model:
real_estate_listing.rb
Source code for SCSS stylesheet:
real_estate_listings.scss
Run the seed file and view the index view with this URL:
http://localhost:3000/real_estate_listings