Ruby on Rails | Screencasts | Download | Documentation | Weblog | Community | Source

Changeset 4902

Show
Ignore:
Timestamp:
09/02/06 19:32:45 (2 years ago)
Author:
david
Message:

Updated docs and otherwise

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/actionmailer/CHANGELOG

    r4885 r4902  
    11*SVN* 
     2 
     3* Fixed that iconv decoding should catch InvalidEncoding #3153 [jon@siliconcircus.com] 
    24 
    35* Tighten rescue clauses.  #5985 [james@grayproductions.net] 
  • trunk/actionmailer/lib/action_mailer.rb

    r4481 r4902  
    2828  rescue LoadError 
    2929    require 'rubygems' 
    30     require_gem 'actionpack', '>= 1.9.1
     30    require_gem 'actionpack', '>= 1.12.5
    3131  end 
    3232end 
  • trunk/actionmailer/lib/action_mailer/base.rb

    r4885 r4902  
    88  # ActionMailer allows you to send email from your application using a mailer model and views. 
    99  # 
     10  # 
    1011  # = Mailer Models 
     12  # 
    1113  # To use ActionMailer, you need to create a mailer model. 
    1214  #    
     
    2426  #      from       "system@example.com" 
    2527  #      subject    "New account information" 
    26   #      body       "account" => recipient 
     28  #      body       :account => recipient 
    2729  #    end 
    2830  #  end 
     
    4648  # view. 
    4749  # 
    48   # = Mailer Views 
     50  # 
     51  # = Mailer views 
     52  # 
    4953  # Like ActionController, each mailer class has a corresponding view directory 
    5054  # in which each method of the class looks for a template with its name. 
     
    6064  #   Thanks for joining our service! Please check back often. 
    6165  # 
    62   # = Sending Mail 
     66  # You can even use Action Pack helpers in these views. For example: 
     67  # 
     68  #   You got a new note! 
     69  #   <%= truncate(note.body, 25) %> 
     70  #  
     71  # 
     72  # = Generating URLs for mailer views 
     73  # 
     74  # If your view includes URLs from the application, you need to use url_for in the mailing method instead of the view. 
     75  # Unlike controllers from Action Pack, the mailer instance doesn't have any context about the incoming request. That's 
     76  # why you need to jump this little hoop and supply all the details needed for the URL. Example: 
     77  # 
     78  #    def signup_notification(recipient) 
     79  #      recipients recipient.email_address_with_name 
     80  #      from       "system@example.com" 
     81  #      subject    "New account information" 
     82  #      body       :account => recipient, 
     83  #                 :home_page => url_for(:host => "example.com", :controller => "welcome", :action => "greeting") 
     84  #    end 
     85  # 
     86  # You can now access @home_page in the template and get http://example.com/welcome/greeting. 
     87  # 
     88  # = Sending mail 
     89  # 
    6390  # Once a mailer action and template are defined, you can deliver your message or create it and save it  
    6491  # for delivery later: 
     
    74101  # delivered by invoking <tt>Notifier.deliver_signup_notification</tt>. 
    75102  # 
    76   # = HTML Email 
     103  # 
     104  # = HTML email 
     105  # 
    77106  # To send mail as HTML, make sure your view (the <tt>.rhtml</tt> file) generates HTML and 
    78107  # set the content type to html. 
     
    88117  #   end   
    89118  # 
    90   # = Multipart Email 
     119  # 
     120  # = Multipart email 
     121  # 
    91122  # You can explicitly specify multipart messages: 
    92123  # 
     
    121152  # each template. 
    122153  # 
     154  # 
    123155  # = Attachments 
     156  # 
    124157  # Attachments can be added by using the +attachment+ method. 
    125158  # 
     
    141174  #     end 
    142175  #   end  
     176  # 
    143177  # 
    144178  # = Configuration options 
  • trunk/actionmailer/lib/action_mailer/version.rb

    r4183 r4902  
    33    MAJOR = 1 
    44    MINOR = 2 
    5     TINY  = 1 
     5    TINY  = 5 
    66 
    77    STRING = [MAJOR, MINOR, TINY].join('.') 
  • trunk/actionmailer/MIT-LICENSE

    r4 r4902  
    1 Copyright (c) 2004 David Heinemeier Hansson 
     1Copyright (c) 2004-2006 David Heinemeier Hansson 
    22 
    33Permission is hereby granted, free of charge, to any person obtaining 
  • trunk/actionmailer/Rakefile

    r4204 r4902  
    5555  s.homepage = "http://www.rubyonrails.org" 
    5656 
    57   s.add_dependency('actionpack', '= 1.12.1' + PKG_BUILD) 
     57  s.add_dependency('actionpack', '= 1.12.5' + PKG_BUILD) 
    5858 
    5959  s.has_rdoc = true 
  • trunk/actionmailer/README

    r2743 r4902  
    22 
    33Action Mailer is a framework for designing email-service layers. These layers 
    4 are used to consolidate code for sending out forgotten passwords, welcoming 
     4are used to consolidate code for sending out forgotten passwords, welcome 
    55wishes on signup, invoices for billing, and any other use case that requires 
    66a written notification to either a person or another system.