removing more duplicate code. :'(

This commit is contained in:
Aaron Patterson 2010-10-01 18:09:37 -07:00
parent 50cf5c11a1
commit 3eb7f9adee
1 changed files with 1 additions and 13 deletions

View File

@ -1,17 +1,5 @@
require 'abstract_unit'
class Comment
extend ActiveModel::Naming
include ActiveModel::Conversion
attr_reader :id
def to_key; id ? [id] : nil end
def save; @id = 1 end
def new_record?; @id.nil? end
def name
@id.nil? ? 'new comment' : "comment ##{@id}"
end
end
require 'controller/fake_models'
class Sheep
extend ActiveModel::Naming