1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Add missing punctuation mark to all ActionMailer docs [ci skip]

This commit is contained in:
amitkumarsuroliya 2015-09-28 21:17:44 +05:30
parent dd5b083f5d
commit 367e8cf763
5 changed files with 12 additions and 12 deletions

View file

@ -1,5 +1,5 @@
module ActionMailer module ActionMailer
# Returns the version of the currently loaded Action Mailer as a <tt>Gem::Version</tt> # Returns the version of the currently loaded Action Mailer as a <tt>Gem::Version</tt>.
def self.gem_version def self.gem_version
Gem::Version.new VERSION::STRING Gem::Version.new VERSION::STRING
end end

View file

@ -29,7 +29,7 @@ module ActionMailer
end end
end end
# Use the logger configured for ActionMailer::Base # Use the logger configured for ActionMailer::Base.
def logger def logger
ActionMailer::Base.logger ActionMailer::Base.logger
end end

View file

@ -60,9 +60,9 @@ module ActionMailer
# #
# Options: # Options:
# #
# * <tt>:wait</tt> - Enqueue the email to be delivered with a delay # * <tt>:wait</tt> - Enqueue the email to be delivered with a delay.
# * <tt>:wait_until</tt> - Enqueue the email to be delivered at (after) a specific date / time # * <tt>:wait_until</tt> - Enqueue the email to be delivered at (after) a specific date / time.
# * <tt>:queue</tt> - Enqueue the email on the specified queue # * <tt>:queue</tt> - Enqueue the email on the specified queue.
def deliver_later(options={}) def deliver_later(options={})
enqueue_delivery :deliver_now, options enqueue_delivery :deliver_now, options
end end

View file

@ -52,7 +52,7 @@ module ActionMailer
extend ActiveSupport::DescendantsTracker extend ActiveSupport::DescendantsTracker
class << self class << self
# Returns all mailer preview classes # Returns all mailer preview classes.
def all def all
load_previews if descendants.empty? load_previews if descendants.empty?
descendants descendants
@ -68,27 +68,27 @@ module ActionMailer
message message
end end
# Returns all of the available email previews # Returns all of the available email previews.
def emails def emails
public_instance_methods(false).map(&:to_s).sort public_instance_methods(false).map(&:to_s).sort
end end
# Returns true if the email exists # Returns true if the email exists.
def email_exists?(email) def email_exists?(email)
emails.include?(email) emails.include?(email)
end end
# Returns true if the preview exists # Returns true if the preview exists.
def exists?(preview) def exists?(preview)
all.any?{ |p| p.preview_name == preview } all.any?{ |p| p.preview_name == preview }
end end
# Find a mailer preview by its underscored class name # Find a mailer preview by its underscored class name.
def find(preview) def find(preview)
all.find{ |p| p.preview_name == preview } all.find{ |p| p.preview_name == preview }
end end
# Returns the underscored name of the mailer preview without the suffix # Returns the underscored name of the mailer preview without the suffix.
def preview_name def preview_name
name.sub(/Preview$/, '').underscore name.sub(/Preview$/, '').underscore
end end

View file

@ -2,7 +2,7 @@ require 'active_job'
module ActionMailer module ActionMailer
# Provides helper methods for testing Action Mailer, including #assert_emails # Provides helper methods for testing Action Mailer, including #assert_emails
# and #assert_no_emails # and #assert_no_emails.
module TestHelper module TestHelper
include ActiveJob::TestHelper include ActiveJob::TestHelper