This is a demo of how to build a fullstack content management system (CMS) using Ruby of Rails. It contains the management of resources such as houses, agents and inspections.
Ruby and Ruby of rails should be installed.
gem install rails
rails server
Use the Rails console to directly interact with your domain model. You can interact directly with ActiveRecord objects.
rails console
Rails routes are configured in config/routes.rb. To see current routes and their associated prefixes.
rails routes
The following example commands generates active record models
rails generate model House address:string size:integer sold:boolean bed:integer bath:integer garage:integer image:string
After generating models you need to applying migrations to change the database schema
rails db:migrate
rails generate migration CreateHousesAgentsJoinTable
Seeds allow database to be initiated with some sample data. Just use active record in your db/seeds.rb file
rails db:seed
Session based authentication is implemented in this demo.
Ensure gem 'bcrypt', '~> 3.1.7'
in your Gemfile is uncommented and run
bundle install