app/models/message_request.rb in enju_message-0.0.20 vs app/models/message_request.rb in enju_message-0.0.21
- old
+ new
@@ -1,8 +1,8 @@
require 'erubis'
class MessageRequest < ActiveRecord::Base
attr_accessible :body
- attr_accessible :sender, :receiver, :message_template, :as => :admin
+ attr_accessible :sender, :receiver, :message_template, :sent_at, :as => :admin
scope :not_sent, where('sent_at IS NULL AND state = ?', 'pending')
scope :sent, where(:state => 'sent')
scope :started, where(:state => 'started')
belongs_to :message_template, :validate => true
belongs_to :sender, :class_name => "User", :foreign_key => "sender_id", :validate => true