2010-05-08 20:27:49 +00:00
|
|
|
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
|
|
|
|
|
2009-03-20 15:07:49 +00:00
|
|
|
def condition_is_true
|
|
|
|
true
|
|
|
|
end
|
|
|
|
|
|
|
|
def condition_is_true_but_its_not
|
|
|
|
false
|
|
|
|
end
|
|
|
|
end
|