Skip to content

Instantly share code, notes, and snippets.

View mnelson's full-sized avatar

Mike Nelson mnelson

View GitHub Profile
class ApplicationController < ActionController::Base
helper_method :page_title,
:page_description
# ...
end
Class.Mutators.Memoize = function(method_names){
Array.from(method_names).each(function(method){
var old_method = this.prototype[method];
this.prototype[method] = function(){
if(this.__memoized[method] !== undefined) return this.__memoized[method];
return this.__memoized[method] = old_method.apply(this, arguments);
};
}, this);
module FacebookSession
module Session
def self.included(base)
base.class_eval do
cattr_accessor :finding_current
include Methods
end
end
module Methods