diff options
Diffstat (limited to 'activemodel/test/models/topic.rb')
-rw-r--r-- | activemodel/test/models/topic.rb | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/activemodel/test/models/topic.rb b/activemodel/test/models/topic.rb index 1350aa17e7..f25b774cd7 100644 --- a/activemodel/test/models/topic.rb +++ b/activemodel/test/models/topic.rb @@ -1,4 +1,14 @@ -class Topic < ActiveRecord::Base +class Topic + include ActiveModel::Validations + + attr_accessor :title, :author_name, :content, :approved + + def initialize(attributes = {}) + attributes.each do |key, value| + send "#{key}=", value + end + end + def condition_is_true true end |