Permalink
Browse files

Merge pull request #10 from ncavig/master

Latest Rails 3.1 rc1 removes some classes
  • Loading branch information...
2 parents e68c00c + d44ac5a commit 093c2b5d6f194565fb732f13202f911f9c9a9e0d @maccman maccman committed Jun 9, 2011
Showing with 5 additions and 3 deletions.
  1. +0 −2 lib/supermodel.rb
  2. +5 −1 lib/supermodel/base.rb
View
@@ -2,10 +2,8 @@
gem "activemodel"
require "active_support/core_ext/class/attribute_accessors"
-require "active_support/core_ext/class/inheritable_attributes"
require "active_support/core_ext/hash/indifferent_access"
require "active_support/core_ext/kernel/reporting"
-require "active_support/core_ext/module/attr_accessor_with_default"
require "active_support/core_ext/module/delegation"
require "active_support/core_ext/module/aliasing"
require "active_support/core_ext/object/blank"
View
@@ -4,7 +4,11 @@ class Base
self.known_attributes = []
class << self
- attr_accessor_with_default(:primary_key, 'id') #:nodoc:
+ attr_accessor(:primary_key) #:nodoc:
+
+ def primary_key
+ @primary_key ||= 'id'
+ end
def collection(&block)
@collection ||= Class.new(Array)

0 comments on commit 093c2b5

Please sign in to comment.