Skip to content

Instantly share code, notes, and snippets.

@oelmekki
oelmekki / doc.md
Created December 30, 2015 19:37
Rails + Browserify + React + es7

1. Gemfile

gem 'browserify-rails', '1.5.0' # until fix: https://github.com/browserify-rails/browserify-rails/issues/101
gem 'react-rails'

Browserify-rails allows to use browserify within assets pipeline. React-rails is here only to allow to use #react_component (and thus, prerendering).

Note that jquery-rails can be removed from Gemfile, the npm version of jquery and jquery-ujs will be used instead.

@iwarshak
iwarshak / gist:340433
Created March 22, 2010 19:24
gists for mongo mapreduce post
class Book
include MongoMapper::Document
CONTEXTS = ['authors', 'rating','keywords', 'genre']
CONTEXTS.each do |context|
key context, Array, :index => true
end
key :title, String<br />
key :contexts, Array<br />