Skip to content

Commit

Permalink
Merge pull request maccman#10 from ncavig/master
Browse files Browse the repository at this point in the history
Latest Rails 3.1 rc1 removes some classes
  • Loading branch information
maccman committed Jun 9, 2011
2 parents e68c00c + d44ac5a commit 093c2b5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 0 additions & 2 deletions lib/supermodel.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
6 changes: 5 additions & 1 deletion lib/supermodel/base.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 093c2b5

Please sign in to comment.