Skip to content

Commit

Permalink
Merge pull request #1136 from arunagw/actionmailer_readme
Browse files Browse the repository at this point in the history
Actionmailer readme
  • Loading branch information
josevalim committed May 19, 2011
2 parents b5fec0f + e3eaeb4 commit 5281c29
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion actionmailer/README.rdoc
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ Example:
)

if email.has_attachments?
for attachment in email.attachments
email.attachments.each do |attachment|
page.attachments.create({
:file => attachment, :description => email.subject
})
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<% module_namespacing do -%>
class <%= class_name %> < ActionMailer::Base
default <%= key_value :from, '"from@example.com"' %>
<% for action in actions -%>
<% actions.each do |action| -%>

# Subject can be set in your I18n file at config/locales/en.yml
# with the following lookup:
Expand Down
4 changes: 2 additions & 2 deletions actionpack/lib/action_view/helpers/atom_feed_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ module AtomFeedHelper
# feed.title("My great blog!")
# feed.updated(@posts.first.created_at)
#
# for post in @posts
# @posts.each do |post|
# feed.entry(post) do |entry|
# entry.title(post.title)
# entry.content(post.body, :type => 'html')
Expand Down Expand Up @@ -66,7 +66,7 @@ module AtomFeedHelper
# feed.updated((@posts.first.created_at))
# feed.tag!(openSearch:totalResults, 10)
#
# for post in @posts
# @posts.each do |post|
# feed.entry(post) do |entry|
# entry.title(post.title)
# entry.content(post.body, :type => 'html')
Expand Down
18 changes: 9 additions & 9 deletions actionpack/test/template/atom_feed_helper_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class ScrollsController < ActionController::Base
feed.title("My great blog!")
feed.updated((@scrolls.first.created_at))
for scroll in @scrolls
@scrolls.each do |scroll|
feed.entry(scroll) do |entry|
entry.title(scroll.title)
entry.content(scroll.body, :type => 'html')
Expand All @@ -33,7 +33,7 @@ class ScrollsController < ActionController::Base
feed.title("My great blog!")
feed.updated((@scrolls.first.created_at))
for scroll in @scrolls
@scrolls.each do |scroll|
feed.entry(scroll, :url => "/otherstuff/" + scroll.to_param.to_s, :updated => Time.utc(2007, 1, scroll.id)) do |entry|
entry.title(scroll.title)
entry.content(scroll.body, :type => 'html')
Expand All @@ -54,7 +54,7 @@ class ScrollsController < ActionController::Base
author.name("DHH")
end
for scroll in @scrolls
@scrolls.each do |scroll|
feed.entry(scroll, :url => "/otherstuff/" + scroll.to_param.to_s, :updated => Time.utc(2007, 1, scroll.id)) do |entry|
entry.title(scroll.title)
entry.content(scroll.body, :type => 'html')
Expand All @@ -68,7 +68,7 @@ class ScrollsController < ActionController::Base
feed.title("My great blog!")
feed.updated((@scrolls.first.created_at))
for scroll in @scrolls
@scrolls.each do |scroll|
feed.entry(scroll) do |entry|
entry.title(scroll.title)
entry.content(scroll.body, :type => 'html')
Expand All @@ -86,7 +86,7 @@ class ScrollsController < ActionController::Base
feed.title("My great blog!")
feed.updated((@scrolls.first.created_at))
for scroll in @scrolls
@scrolls.each do |scroll|
feed.entry(scroll, :id => "tag:test.rubyonrails.org,2008:"+scroll.id.to_s) do |entry|
entry.title(scroll.title)
entry.content(scroll.body, :type => 'html')
Expand All @@ -105,7 +105,7 @@ class ScrollsController < ActionController::Base
feed.title("My great blog!")
feed.updated((@scrolls.first.created_at))
for scroll in @scrolls
@scrolls.each do |scroll|
feed.entry(scroll) do |entry|
entry.title(scroll.title)
entry.content(scroll.body, :type => 'html')
Expand All @@ -123,7 +123,7 @@ class ScrollsController < ActionController::Base
feed.title("My great blog!")
feed.updated((@scrolls.first.created_at))
for scroll in @scrolls
@scrolls.each do |scroll|
feed.entry(scroll) do |entry|
entry.title(scroll.title)
entry.content(scroll.body, :type => 'html')
Expand All @@ -140,7 +140,7 @@ class ScrollsController < ActionController::Base
feed.title("My great blog!")
feed.updated((@scrolls.first.created_at))
for scroll in @scrolls
@scrolls.each do |scroll|
feed.entry(scroll) do |entry|
entry.title(scroll.title)
entry.summary(:type => 'xhtml') do |xhtml|
Expand All @@ -165,7 +165,7 @@ class ScrollsController < ActionController::Base
feed.title("My great blog!")
feed.updated((@scrolls.first.created_at))
for scroll in @scrolls
@scrolls.each do |scroll|
feed.entry(scroll) do |entry|
entry.title(scroll.title)
entry.content(scroll.body, :type => 'html')
Expand Down

0 comments on commit 5281c29

Please sign in to comment.