Library Management System - Ruby on Rails
- Signup/Login users
- Books CRUD
- Mail book details to user (Async)
- Subject-wise Categorization of Books
bundle install
rake db:create
rake db:migrate
rails s
-
Update the database.yml for postgres
-
Setup library-management database
$ rake db:create
$ rake db:migrate
- Generate Book and Subject model
$ rails generate model Book
$ rails generate model Subject
- Generate Book and Subject migration
$ rails generate migration books
$ rails generate migration subjects
$ rails db:migrate
- Generate controller
$ rails generate controller Book
- Add Carrierwave for image storage
$ rails generate uploader Image
$ rails generate migration add_image_to_books image:string
$ rake db:migrate
- Adding Devise and User
https://guides.railsgirls.com/devise
$ bundle install
$ rails g devise:install
Ensure you have defined default url options in your environments files. Open up config/environments/development.rb and add this line:
config.action_mailer.default_url_options = { host: 'localhost', port: 3000 }
$ rails g devise user
$ rails db:migrate
- Add ActionMailer
$ rails generate mailer UserMailer