This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class DrinksController < ApplicationController | |
| def show | |
| render json: { | |
| title: "Sparkling Negroni", | |
| ingredients: [ | |
| "⅓ oz. Campari", | |
| "⅓ oz. gin", | |
| "⅓ oz. sweet vermouth", | |
| "Chilled prosecco, or other sparkling wine, for topping", | |
| "Orange peel twist (optional)" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "name": "client", | |
| "version": "0.1.0", | |
| "private": true, | |
| "proxy": "http://localhost:3001", | |
| "devDependencies": { | |
| "react-scripts": "0.9.0", | |
| }, | |
| "dependencies": { | |
| "react": "^15.4.2", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "name": "list-of-ingredients", | |
| "engines": { | |
| "node": "6.3.1" | |
| }, | |
| "scripts": { | |
| "build": "cd client && npm install && npm run build && cd ..", | |
| "deploy": "cp -a client/build/. public/", | |
| "postinstall": "npm run build && npm run deploy && echo 'Client built!'" | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| require_relative 'boot' | |
| require "rails" | |
| # Pick the frameworks you want: | |
| require "active_model/railtie" | |
| require "active_job/railtie" | |
| require "active_record/railtie" | |
| require "action_controller/railtie" | |
| require "action_mailer/railtie" | |
| require "action_view/railtie" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| config.middleware.use Rack::MethodOverride | |
| config.middleware.use ActionDispatch::Flash | |
| config.middleware.use ActionDispatch::Cookies | |
| config.middleware.use ActionDispatch::Session::CookieStore |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Running via Spring preloader in process 49455 | |
| invoke devise | |
| generate No need to install devise, already done. | |
| invoke active_record | |
| create db/migrate/20170228184603_devise_create_admin_users.rb | |
| create app/models/admin_user.rb | |
| invoke test_unit | |
| create test/models/admin_user_test.rb | |
| create test/fixtures/admin_users.yml | |
| insert app/models/admin_user.rb |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| source 'https://rubygems.org' | |
| git_source(:github) do |repo_name| | |
| repo_name = "#{repo_name}/#{repo_name}" unless repo_name.include?("/") | |
| "https://github.com/#{repo_name}.git" | |
| end | |
| # Bundle edge Rails instead: gem 'rails', github: 'rails/rails' | |
| gem 'rails', '~> 5.0.1' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Before: | |
| class ApplicationController < ActionController::API | |
| end | |
| # After: | |
| class ApplicationController < ActionController::Base | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import React, { Component } from 'react'; | |
| import Helmet from 'react-helmet'; | |
| import logo from './logo.svg'; | |
| import './App.css'; | |
| class App extends Component { | |
| render() { | |
| return ( | |
| <div className="App"> | |
| <Helmet title="You Are Doing Great" /> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import React from 'react' | |
| import ReactDOM from 'react-dom' | |
| import App from './App' | |
| import './index.css' | |
| const rootEl = document.getElementById('root') | |
| ReactDOM.render( | |
| <App />, | |
| rootEl |