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
= form_for(@bug) do |f| | |
= label_tag(:flow, Flow) | |
= f.collection_select :flow_id, Flow.all, :id, :name |
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
def index | |
Attachment.all do |a| | |
File.open(a.filename, 'w') { |file| | |
file.write(a.filedata) | |
} | |
end | |
end |
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
[Mon Jan 11 04:24:37.594424 2016] [core:warn] [pid 1] AH00111: Config variable ${APACHE_LOG_DIR} is not defined | |
AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 172.17.0.2. Set the 'ServerName' directive globally to suppress this message | |
(2)No such file or directory: AH02291: Cannot access directory '/etc/apache2/${APACHE_LOG_DIR}/' for error log of vhost defined at /etc/apache2/sites-enabled/000-default.conf:1 | |
AH00014: Configuration check failed |
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 jsdom from 'jsdom' | |
import chai from 'chai' | |
import plugin from 'chai-enzyme' | |
const doc = jsdom.jsdom('<!doctype html><html><body></body></html>') | |
const win = doc.defaultView | |
global.document = doc | |
global.window = win |
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 React from 'react' | |
import { render } from 'react-dom' | |
import { createStore, applyMiddleware } from 'redux' | |
import { Provider } from 'react-redux' | |
import thunk from 'redux-thunk' | |
import { IndexRoute, Router, Route, browserHistory } from 'react-router' | |
import { syncHistory } from 'react-router-redux' | |
const reduxRouterMiddleware = syncHistory(browserHistory) | |
/* |
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
'use strict'; | |
import webpack from 'webpack'; | |
import HtmlWebpackPlugin from 'html-webpack-plugin'; | |
import path from 'path' | |
const env = process.env['NODE_ENV'] || 'development' | |
const config = { | |
entry: [ |
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
$ node_modules/.bin/webpack --config webpack.config.test.babel.js --target node test.js | |
Hash: b082aebc395d1dffcd90 | |
Version: webpack 1.12.13 | |
Time: 1752ms | |
Asset Size Chunks Chunk Names | |
test.js 1.05 MB 0 [emitted] main | |
test.js.map 1.26 MB 0 [emitted] main | |
[0] multi main 40 bytes {0} [built] | |
[2] ./app \.test\.js$ 356 bytes {0} [built] | |
+ 176 hidden modules |
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
// https://webpack.github.io/docs/list-of-plugins.html#commonschunkplugin | |
new webpack.optimize.CommonsChunkPlugin({ | |
name: 'vendor', | |
filename: 'vendor.[hash].js', | |
minChunks: Infinity | |
}) |
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
// imports go here... | |
// Assume prop{1,2} are sent in via props. I use react-router-redux for this. | |
const Page = ({ children, prop1, prop2 }) => ( | |
<div> | |
<Menu /> | |
<Content { prop1, prop2 }> | |
{children} | |
</Content> | |
</div> | |
) |
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
diff --git c/app/app.js w/app/app.js | |
index 171ab05..1dfe5f5 100644 | |
--- c/app/app.js | |
+++ w/app/app.js | |
@@ -8,8 +8,6 @@ import { routeActions, syncHistory } from 'react-router-redux' | |
const reduxRouterMiddleware = syncHistory(browserHistory) | |
// const reduxRouterMiddleware = syncHistory(hashHistory) | |
-import 'babel-polyfill' | |
- |