Skip to content

Instantly share code, notes, and snippets.

// From http://developer.yahoo.com/yui/3/examples/overlay/overlay-io-plugin.html
YUI3.use('overlay', 'io', function(Y) {
function Lightbox(config) {
arguments.callee.superclass.constructor.call(this, config);
};
Lightbox.NAME = "lightbox";
Lightbox.NS = "lightbox";
Y.extend(Lightbox, Y.Overlay, {
diff --git a/activerecord_base_without_table/lib/active_record/base_without_table.rb b/activerecord_base_without_table/lib/active_record/base_without_table.rb
index 429d121..c6af6eb 100644
--- a/activerecord_base_without_table/lib/active_record/base_without_table.rb
+++ b/activerecord_base_without_table/lib/active_record/base_without_table.rb
@@ -1,6 +1,8 @@
module ActiveRecord
class BaseWithoutTable < Base
self.abstract_class = true
+ class_inheritable_array :columns
+ self.columns = []
diff --git a/activerecord_base_without_table/lib/active_record/base_without_table.rb b/activerecord_base_without_table/lib/active_record/base_without_table.rb
index da6cdc8..429d121 100644
--- a/activerecord_base_without_table/lib/active_record/base_without_table.rb
+++ b/activerecord_base_without_table/lib/active_record/base_without_table.rb
@@ -6,6 +6,9 @@ module ActiveRecord
errors.empty?
end
+ # Prevent AR from associating to this record by ID; we should be serialized instead.
+ private :quoted_id