Giter Site home page Giter Site logo

online_book_store's Introduction

OnlineBookStore

This application was created as an example for CCS Fall 2018 students. This application is the goal of a 2-week deep dive into Rails. Students are expected to resolve the following spec:

As a user, I should be able to...

  • Create an account
  • Browse books (index/show)
  • Browse authors (index/show)
  • Purchase a book (from show view)
  • Download the book in multiple formats (PDF, mobi, epub)
  • Get an email after purchasing with a link to download book
  • View all purchases and be able to download books as many times as needed

Setup

This app was generated using the following steps

  1. Create a new Rails app, using postgresql as the database, skipping coffeescript, TestUnit, and installing react rails new <app-name> --database=postgresql --skip-coffee --skip-test --webpack=react

  2. Update config/application.rb

This block goes inside the AppName::Application block to generate rspec files, and skip CSS and JS files when using the generators.

# customize generators
config.generators do |g|
  g.test_framework  :rspec, fixture: false
  g.stylesheets     false
  g.javascripts     false
end
  1. Additional Gemfile setup

Add the following to the global scope:

gem 'devise', '~> 4.5.0โ€™

Add the following to the test/development scope:

  gem 'pry-rails', '~> 0.3.6'
  gem 'rspec-rails', '~> 3.8.0'

Then run bundle install

  1. Create databases rails db:create

  2. Install rspec-rails rails generate rspec:install

  3. Install devise and create User model rails g devise:install

Create the Devise user model and migration: rails g devise User

then run rails db:migrate

online_book_store's People

Contributors

aburka avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.