Changeset 1121

Show
Ignore:
Timestamp:
07/31/07 00:43:37 (1 year ago)
Author:
alban
Message:

[Bug 157] mise en place de la notification quand un cast est cree

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/app/models/cast.rb

    r1117 r1121  
    5252                                end 
    5353                        end 
     54                        document.casts << cast 
     55            Mailer::deliver_document_ready(document) 
    5456                end 
    5557        end 
  • trunk/app/models/mailer.rb

    r661 r1121  
    77    @body["user"] = user 
    88  end 
     9   
     10  def document_ready(document) 
     11    @recipients = document.author.email 
     12    @from = "AudioBank <audiobank@tryphon.org>" 
     13    @subject = "[AudioBank] #{document.title} prêt" 
     14    @body = { :document => document, :user => document.author } 
     15  end 
     16   
    917end