Skip to content

tft-shubham/authors_books_rails_demo_app

 
 

Repository files navigation

Prerequisites

The setups steps expect following tools installed on the system.

1. Check out the repository
git clone https://github.com/shubhamsharma4587/authors_books_rails_demo_app.git
2. Create database.yml file

Edit the database configuration as required such as database username, password

cp config/database.yml config/database.yml
3. Create and setup the database

Run the following commands to create and setup the database.

rails db:create
rails db:migrate 
4. Remove Gemfile.lock if present and install bundle
rm Gemfile.lock
bundle install
5. Start the Rails server

You can start the rails server using the command given below.

rails s -p 3000

And now you can visit the site with the URL http://localhost:3000

**Note:- For APIs use the same urls and add .json at the end of the url

eg.

All Authors data: [GET] http://localhost:3000/authors.json

Get Author by ID: [GET] http://localhost:3000/authors/:author_id.json

About

It based on many-to-many relationship in rails. And also has one logic how to use different primary key in rails not default id column

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • Ruby 73.8%
  • HTML 18.9%
  • SCSS 2.7%
  • JavaScript 2.2%
  • CSS 1.6%
  • CoffeeScript 0.8%