This file contains 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
const mongoose = require('mongoose'); | |
const Store = mongoose.model('Store'); | |
const StoreB = mongoose.model('StoreB'); | |
// Tells package to use es6 promises | |
mongoose.Promise = global.Promise | |
// Hey I'm async so i'll have awaits calls inside of me | |
exports.createStore = async (req, res) => { | |
const store = new Store(req.body); |
This file contains 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
{"lastUpload":"2020-02-10T15:52:31.833Z","extensionVersion":"v3.4.3"} |
This file contains 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
const mongoose = require('mongoose'); | |
const Store = mongoose.model('Store'); | |
const StoreB = mongoose.model('StoreB'); | |
// Tells package to use es6 promises | |
mongoose.Promise = global.Promise; | |
exports.createStore = (req, res) => { | |
const store = new Store(req.body); | |
const record_we_want_to_associate |
This file contains 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
{ | |
"workbench.statusBar.visible": true, | |
"workbench.statusBar.feedback.visible": false, | |
"workbench.startupEditor": "newUntitledFile", | |
"window.zoomLevel": 0, | |
"editor.formatOnSave": true, | |
"javascript.format.enable": false, | |
"prettier.eslintIntegration": true, | |
"editor.scrollBeyondLastLine": false, | |
"editor.minimap.enabled": false, |
This file contains 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
// rake routes | grep resource | |
my_resource_index GET /my_resource(.:format) my_resource#index | |
POST /my_resource(.:format) my_resource#create | |
new_my_resource GET /my_resource/new(.:format) my_resource#new | |
edit_my_resource GET /my_resource/:id/edit(.:format) my_resource#edit | |
my_resource GET /my_resource/:id(.:format) my_resource#show | |
PATCH /my_resource/:id(.:format) my_resource#update | |
PUT /my_resource/:id(.:format) my_resource#update | |
DELETE /my_resource/:id(.:format) my_resource#destroy |
This file contains 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 { combineReducers } from 'redux'; | |
import { reducer as form } from 'redux-form'; | |
import authReducer from './auth_reducer' | |
const rootReducer = combineReducers({ | |
auth: authReducer | |
}); | |
export default rootReducer; |
This file contains 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
export * from './auth_actions' |
This file contains 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 { expect } from "../test_helper"; | |
import configureMockStore from "redux-mock-store"; | |
import thunk from "redux-thunk"; | |
import moxios from "moxios"; | |
import { storageMock } from "./mock_local_storage"; | |
import { signinUser } from "../../src/actions/index"; | |
import { AUTH_USER, AUTH_ERROR } from "../../src/actions/types"; |
This file contains 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 { expect } from "../test_helper"; | |
import configureMockStore from "redux-mock-store"; | |
import thunk from "redux-thunk"; | |
import moxios from "moxios"; | |
import { storageMock } from "./mock_local_storage"; | |
import { signinUser, signoutUser, signUpUser } from "../../src/actions/index"; | |
import { AUTH_USER, AUTH_ERROR, UNAUTH_USER } from "../../src/actions/types"; |
This file contains 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 { expect } from "../test_helper"; | |
import configureMockStore from "redux-mock-store"; | |
import thunk from "redux-thunk"; | |
import moxios from "moxios"; | |
import { storageMock } from "./mock_local_storage"; | |
import { signinUser, signoutUser, signUpUser, fetchCampaigns } from "../../src/actions/index"; | |
import { AUTH_USER, AUTH_ERROR, UNAUTH_USER, FETCH_CAMPAIGNS } from "../../src/actions/types"; |
NewerOlder