Skip to content

Commit 7ead1d8

Browse files
committed
Merge branch 'master' of github.com:lifo/docrails
2 parents 78db16d + 8476932 commit 7ead1d8

36 files changed

+334
-380
lines changed

actionmailer/README.rdoc

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -67,12 +67,12 @@ simply call the method and optionally call +deliver+ on the return value.
6767

6868
Calling the method returns a Mail Message object:
6969

70-
message = Notifier.welcome # => Returns a Mail::Message object
71-
message.deliver # => delivers the email
70+
message = Notifier.welcome("david@loudthinking.com") # => Returns a Mail::Message object
71+
message.deliver # => delivers the email
7272

7373
Or you can just chain the methods together like:
7474

75-
Notifier.welcome.deliver # Creates the email and sends it immediately
75+
Notifier.welcome("david@loudthinking.com").deliver # Creates the email and sends it immediately
7676

7777
== Setting defaults
7878

@@ -119,8 +119,7 @@ trivial case like this:
119119
rails runner 'Mailman.receive(STDIN.read)'
120120

121121
However, invoking Rails in the runner for each mail to be received is very resource intensive. A single
122-
instance of Rails should be run within a daemon, if it is going to be utilized to process more than just
123-
a limited number of email.
122+
instance of Rails should be run within a daemon, if it is going to process more than just a limited amount of email.
124123

125124
== Configuration
126125

actionmailer/lib/action_mailer/base.rb

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -334,8 +334,8 @@ module ActionMailer
334334
# and starts to use it.
335335
# * <tt>:openssl_verify_mode</tt> - When using TLS, you can set how OpenSSL checks the certificate. This is
336336
# really useful if you need to validate a self-signed and/or a wildcard certificate. You can use the name
337-
# of an OpenSSL verify constant ('none', 'peer', 'client_once','fail_if_no_peer_cert') or directly the
338-
# constant (OpenSSL::SSL::VERIFY_NONE, OpenSSL::SSL::VERIFY_PEER,...).
337+
# of an OpenSSL verify constant ('none', 'peer', 'client_once', 'fail_if_no_peer_cert') or directly the
338+
# constant (OpenSSL::SSL::VERIFY_NONE, OpenSSL::SSL::VERIFY_PEER, ...).
339339
#
340340
# * <tt>sendmail_settings</tt> - Allows you to override options for the <tt>:sendmail</tt> delivery method.
341341
# * <tt>:location</tt> - The location of the sendmail executable. Defaults to <tt>/usr/sbin/sendmail</tt>.
@@ -596,9 +596,9 @@ def attachments
596596
# class method:
597597
#
598598
# class Notifier < ActionMailer::Base
599-
# self.default from: 'no-reply@test.lindsaar.net',
600-
# bcc: 'email_logger@test.lindsaar.net',
601-
# reply_to: 'bounces@test.lindsaar.net'
599+
# default from: 'no-reply@test.lindsaar.net',
600+
# bcc: 'email_logger@test.lindsaar.net',
601+
# reply_to: 'bounces@test.lindsaar.net'
602602
# end
603603
#
604604
# If you need other headers not listed above, you can either pass them in

actionpack/lib/action_view/helpers/form_tag_helper.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ def form_tag(url_for_options = {}, options = {}, &block)
8181
# ==== Options
8282
# * <tt>:multiple</tt> - If set to true the selection will allow multiple choices.
8383
# * <tt>:disabled</tt> - If set to true, the user will not be able to use this input.
84-
# * <tt>:include_blank</tt> - If set to true, an empty option will be create
84+
# * <tt>:include_blank</tt> - If set to true, an empty option will be created.
8585
# * <tt>:prompt</tt> - Create a prompt option with blank value and the text asking user to select something
8686
# * Any other key creates standard HTML attributes for the tag.
8787
#

activerecord/lib/active_record/autosave_association.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@ module ActiveRecord
1717
# be destroyed directly. They will however still be marked for destruction.
1818
#
1919
# Note that <tt>autosave: false</tt> is not same as not declaring <tt>:autosave</tt>.
20-
# When the <tt>:autosave</tt> option is not present new associations are saved.
20+
# When the <tt>:autosave</tt> option is not present then new association records are
21+
# saved but the updated association records are not saved.
2122
#
2223
# == Validation
2324
#

activerecord/lib/active_record/persistence.rb

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,9 @@ def persisted?
9999
# <tt>before_*</tt> callbacks return +false+ the action is cancelled and
100100
# +save+ returns +false+. See ActiveRecord::Callbacks for further
101101
# details.
102+
#
103+
# Attributes marked as readonly are silently ignored if the record is
104+
# being updated.
102105
def save(*)
103106
create_or_update
104107
rescue ActiveRecord::RecordInvalid
@@ -118,6 +121,9 @@ def save(*)
118121
# the <tt>before_*</tt> callbacks return +false+ the action is cancelled
119122
# and <tt>save!</tt> raises ActiveRecord::RecordNotSaved. See
120123
# ActiveRecord::Callbacks for further details.
124+
#
125+
# Attributes marked as readonly are silently ignored if the record is
126+
# being updated.
121127
def save!(*)
122128
create_or_update || raise(RecordNotSaved)
123129
end
@@ -204,6 +210,8 @@ def becomes!(klass)
204210
# * updated_at/updated_on column is updated if that column is available.
205211
# * Updates all the attributes that are dirty in this object.
206212
#
213+
# This method raises an +ActiveRecord::ActiveRecordError+ if the
214+
# attribute is marked as readonly.
207215
def update_attribute(name, value)
208216
name = name.to_s
209217
verify_readonly_attribute(name)

activerecord/lib/active_record/validations/associated.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ def validate_each(record, attribute, value)
99
end
1010

1111
module ClassMethods
12-
# Validates whether the associated object or objects are all valid
13-
# themselves. Works with any kind of association.
12+
# Validates whether the associated object or objects are all valid.
13+
# Works with any kind of association.
1414
#
1515
# class Book < ActiveRecord::Base
1616
# has_many :pages

activesupport/lib/active_support/core_ext/array/wrap.rb

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,12 @@ class Array
1515
#
1616
# * If the argument responds to +to_ary+ the method is invoked. <tt>Kernel#Array</tt>
1717
# moves on to try +to_a+ if the returned value is +nil+, but <tt>Array.wrap</tt> returns
18-
# such a +nil+ right away.
18+
# +nil+ right away.
1919
# * If the returned value from +to_ary+ is neither +nil+ nor an +Array+ object, <tt>Kernel#Array</tt>
2020
# raises an exception, while <tt>Array.wrap</tt> does not, it just returns the value.
21-
# * It does not call +to_a+ on the argument, though special-cases +nil+ to return an empty array.
21+
# * It does not call +to_a+ on the argument, but returns an empty array if argument is +nil+.
2222
#
23-
# The last point is particularly worth comparing for some enumerables:
23+
# The second point is easily explained with some enumerables:
2424
#
2525
# Array(foo: :bar) # => [[:foo, :bar]]
2626
# Array.wrap(foo: :bar) # => [{:foo=>:bar}]
@@ -29,10 +29,10 @@ class Array
2929
#
3030
# [*object]
3131
#
32-
# which for +nil+ returns <tt>[]</tt>, and calls to <tt>Array(object)</tt> otherwise.
32+
# which returns <tt>[]</tt> for +nil+, but calls to <tt>Array(object)</tt> otherwise.
3333
#
34-
# Thus, in this case the behavior may be different for +nil+, and the differences with
35-
# <tt>Kernel#Array</tt> explained above apply to the rest of <tt>object</tt>s.
34+
# The differences with <tt>Kernel#Array</tt> explained above
35+
# apply to the rest of <tt>object</tt>s.
3636
def self.wrap(object)
3737
if object.nil?
3838
[]
File renamed without changes.
49.3 KB
Loading
-70.3 KB
Binary file not shown.

0 commit comments

Comments
 (0)