Skip to content

Instantly share code, notes, and snippets.

Time::ReportsController#index (NoMethodError) "undefined method `quoted_table_name' for Saulabs::Reportable::Report:Class"
/home/madrobby/webapps/freckle.com/releases/20100530163247/vendor/rails/activerecord/lib/active_record/reflection.rb:187:in `quoted_table_name'
/home/madrobby/webapps/freckle.com/releases/20100530163247/vendor/rails/activerecord/lib/active_record/associations/has_many_association.rb:97:in `construct_sql'
/home/madrobby/webapps/freckle.com/releases/20100530163247/vendor/rails/activerecord/lib/active_record/associations/association_collection.rb:21:in `initialize'
/home/madrobby/webapps/freckle.com/releases/20100530163247/vendor/rails/activerecord/lib/active_record/associations.rb:1300:in `new'
/home/madrobby/webapps/freckle.com/releases/20100530163247/vendor/rails/activerecord/lib/active_record/associations.rb:1300:in `reports'
/home/madrobby/webapps/freckle.com/releases/20100530163247/vendor/rails/activerecord/lib/active_record/associations/association_proxy.rb:217:in `send'
/home/madrob
Object.extend(Date.prototype, {
strftime: function(format) {
var day = this.getDay(), month = this.getMonth();
var hours = this.getHours(), minutes = this.getMinutes();
return format.gsub(/\%([aAbBcdDHiImMpSwyY])/, function(part) {
switch(part[1]) {
case 'a': return $w("Sun Mon Tue Wed Thu Fri Sat")[day]; break;
case 'A': return $w("Sunday Monday Tuesday Wednesday Thursday Friday Saturday")[day]; break;
case 'b': return $w("Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec")[month]; break;
Function.prototype.cached = function(){
var self = this, cache = {};
return function(arg){
if(arg in cache) return cache[arg];
return cache[arg] = self(arg);
}
}
Function.prototype.cached = function(){
var self = this, cache = {};
return function(arg){
if(arg in cache) return cache[arg];
return cache[arg] = self(arg);
}
}
<!-- Inside the loop, for each post -->
<a href="http://twitter.com/share?url=<?php print(urlencode(get_permalink())) ?>&amp;text=<?php print(urlencode(get_the_title())) ?>" class="twitter-share-button" data-count="horizontal" data-via="thomasfuchs">Tweet</a>
<!-- in your footer -->
<script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script>
just a gist
var truth = "This is the one true chat, IMHO";
function createArray(nativeObject){ return [].slice.call(nativeObject); }
// Solution to Part 2.
function isPrime(num) {
var prime = num != 1;
for ( var i = 2; i < num; i++ ) {
if ( num % i == 0 ) {
prime = false;
break;
}
}
// Solution to Part 1.
Function.prototype.cached = function(){
var self = this, cache = {};
return function(arg){
if(arg in cache) return cache[arg];
return cache[arg] = self(arg);
}
}