Class: Marley::Joints::Messages::Message

Inherits:
Sequel::Model
  • Object
show all
Defined in:
lib/marley/joints/messages.rb

Instance Method Summary collapse

Instance Method Details

#authorObject



26
27
28
# File 'lib/marley/joints/messages.rb', line 26

def author
  MR::User[user_id].to_s
end

#replyObject



23
24
25
# File 'lib/marley/joints/messages.rb', line 23

def reply
  self.class.new(:title => "re: #{title}",:content => content)
end

#validateObject



19
20
21
22
# File 'lib/marley/joints/messages.rb', line 19

def validate
  super
  validates_presence [:title]
end