Skip to content

Commit

Permalink
Use a 1.9 Hash syntax in README files (fixes thanks to @vijaydev)
Browse files Browse the repository at this point in the history
  • Loading branch information
robin850 committed Oct 10, 2012
1 parent b12d048 commit f839e61
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
16 changes: 8 additions & 8 deletions actionmailer/README.rdoc
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ Note that every value you set with this method will get over written if you use
Example:

class AuthenticationMailer < ActionMailer::Base
default :from => "[email protected]", :subject => Proc.new { "E-mail was generated at #{Time.now}" }
default from: "[email protected]", subject: Proc.new { "E-mail was generated at #{Time.now}" }
.....
end

Expand All @@ -100,13 +100,13 @@ Example:
def receive(email)
page = Page.find_by_address(email.to.first)
page.emails.create(
:subject => email.subject, :body => email.body
subject: email.subject, body: email.body
)

if email.has_attachments?
email.attachments.each do |attachment|
page.attachments.create({
:file => attachment, :description => email.subject
file: attachment, description: email.subject
})
end
end
Expand All @@ -127,11 +127,11 @@ a limited number of email.
The Base class has the full list of configuration options. Here's an example:

ActionMailer::Base.smtp_settings = {
:address => 'smtp.yourserver.com', # default: localhost
:port => '25', # default: 25
:user_name => 'user',
:password => 'pass',
:authentication => :plain # :plain, :login or :cram_md5
address: 'smtp.yourserver.com', # default: localhost
port: '25', # default: 25
user_name: 'user',
password: 'pass',
authentication: :plain # :plain, :login or :cram_md5
}


Expand Down
2 changes: 1 addition & 1 deletion activemodel/README.rdoc
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ to integrate with Action Pack out of the box: <tt>ActiveModel::Model</tt>.
validates_presence_of :name
end

person = Person.new(:name => 'bob', :age => '18')
person = Person.new(name: 'bob', age: '18')
person.name # => 'bob'
person.age # => '18'
person.valid? # => true
Expand Down

0 comments on commit f839e61

Please sign in to comment.