Skip to content

Instantly share code, notes, and snippets.

# http://stackoverflow.com/a/8936202
#
# ActiveAdmin already includes the necessary jquery in active_admin/base,
# so just add this to javascripts/active_admin.js after //= require active_admin/base
#
#
# Serialize and Sort
#
# model_name - you guessed it, the name of the model we are calling sort on.
# This is the actual variable name, no need to change it.
require 'dalli/client'
require 'yaml'
class GeocoderDalliClient
def initialize
@keys = 'GeocoderDalliClientKeys'
# setup for Heroku using the memcachier gem.
# On other setups you'll have to specify the Memcached server
@dalli_client = Dalli::Client.new
end