Skip to content

Instantly share code, notes, and snippets.

View apavlyut's full-sized avatar

Alexander Pavlyut apavlyut

View GitHub Profile
# connecting select2 to the appropriate hooks:
#
# hard case: best_in_place's select
$ ->
# first, find the mount point
$('body').on 'best_in_place:activate', '.best_in_place', ->
# second, attach empty update() to `this` to screen the downstream calls
# which otherwise will cause an error
require 'tire'
require 'nobrainer'
NoBrainer.connect 'rethinkdb://server/company'
class Employee
include NoBrainer::Document
field :name
field :title