From ae65a1f1dfc957f23e918138bbea89c87941a982 Mon Sep 17 00:00:00 2001 From: Jaime Iniesta Date: Thu, 30 Sep 2010 12:11:51 +0200 Subject: Action Mailer Basics guide - fixed typos --- railties/guides/source/action_mailer_basics.textile | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'railties/guides/source') diff --git a/railties/guides/source/action_mailer_basics.textile b/railties/guides/source/action_mailer_basics.textile index ac9052786e..bbbcb9b650 100644 --- a/railties/guides/source/action_mailer_basics.textile +++ b/railties/guides/source/action_mailer_basics.textile @@ -27,7 +27,7 @@ invoke test_unit create test/functional/user_mailer_test.rb -So we got the mailer, the fixtures, and the tests. +So we got the mailer, the views, and the tests. h5. Edit the Mailer @@ -198,7 +198,7 @@ Adding attachments has been simplified in Action Mailer 3.0. attachments['filename.jpg'] = File.read('/path/to/filename.jpg') -NOTE: Mail will automatically Base64 encode an attachment, if you want something different, pre encode your content and pass in the encoded content and encoding in a +Hash+ to the +attachments+ method. +NOTE: Mail will automatically Base64 encode an attachment, if you want something different, pre-encode your content and pass in the encoded content and encoding in a +Hash+ to the +attachments+ method. * Pass the file name and specify headers and content and Action Mailer and Mail will use the settings you pass in. @@ -247,7 +247,7 @@ h5. Sending Email To Multiple Recipients It is possible to send email to one or more recipients in one email (for e.g. informing all admins of a new signup) by setting the list of emails to the :to key. The to: key however expects a string so you have join the list of recipients using a comma. - Class AdminMailer < ActionMailer::Base + class AdminMailer < ActionMailer::Base default :to => Admin.all.map(&:email).join(", "), :from => "notification@example.com" @@ -403,7 +403,7 @@ The above will send a multipart email with an attachment, properly nested with t h3. Receiving Emails -Receiving and parsing emails with Action Mailer can be a rather complex endeavour. Before your email reaches your Rails app, you would have had to configure your system to somehow forward emails to your app, which needs to be listening for that. So, to receive emails in your Rails app you'll need: +Receiving and parsing emails with Action Mailer can be a rather complex endeavour. Before your email reaches your Rails app, you would have had to configure your system to somehow forward emails to your app, which needs to be listening for that. So, to receive emails in your Rails app you'll need to: * Implement a +receive+ method in your mailer. @@ -509,3 +509,5 @@ In the test we send the email and store the returned object in the +email+ varia h3. Changelog "Lighthouse ticket":http://rails.lighthouseapp.com/projects/16213/tickets/25 + +* September 30, 2010: Fixed typos. "Jaime Iniesta":http://jaimeiniesta.com -- cgit v1.2.3 From ef554156c4e057c66591d6c84037869df8bcdb33 Mon Sep 17 00:00:00 2001 From: Jaime Iniesta Date: Thu, 30 Sep 2010 12:23:52 +0200 Subject: Action Mailer Basics guide - reformatted configuration table --- railties/guides/source/action_mailer_basics.textile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'railties/guides/source') diff --git a/railties/guides/source/action_mailer_basics.textile b/railties/guides/source/action_mailer_basics.textile index bbbcb9b650..34afebcae4 100644 --- a/railties/guides/source/action_mailer_basics.textile +++ b/railties/guides/source/action_mailer_basics.textile @@ -441,9 +441,9 @@ h3. Action Mailer Configuration The following configuration options are best made in one of the environment files (environment.rb, production.rb, etc...) |template_root|Determines the base from which template references will be made.| -|logger|the logger is used for generating information on the mailing run if available. Can be set to nil for no logging. Compatible with both Ruby's own Logger and Log4r loggers.| -|smtp_settings|Allows detailed configuration for :smtp delivery method: :address - Allows you to use a remote mail server. Just change it from its default "localhost" setting. :port - On the off chance that your mail server doesn't run on port 25, you can change it. :domain - If you need to specify a HELO domain, you can do it here. :user_name - If your mail server requires authentication, set the username in this setting. :password - If your mail server requires authentication, set the password in this setting. :authentication - If your mail server requires authentication, you need to specify the authentication type here. This is a symbol and one of :plain, :login, :cram_md5.| -|sendmail_settings|Allows you to override options for the :sendmail delivery method. :location - The location of the sendmail executable. Defaults to /usr/sbin/sendmail. :arguments - The command line arguments. Defaults to -i -t.| +|logger|The logger is used for generating information on the mailing run if available. Can be set to nil for no logging. Compatible with both Ruby's own Logger and Log4r loggers.| +|smtp_settings|Allows detailed configuration for :smtp delivery method:
  • :address - Allows you to use a remote mail server. Just change it from its default "localhost" setting.
  • :port - On the off chance that your mail server doesn't run on port 25, you can change it.
  • :domain - If you need to specify a HELO domain, you can do it here.
  • :user_name - If your mail server requires authentication, set the username in this setting.
  • :password - If your mail server requires authentication, set the password in this setting.
  • :authentication - If your mail server requires authentication, you need to specify the authentication type here. This is a symbol and one of :plain, :login, :cram_md5.
| +|sendmail_settings|Allows you to override options for the :sendmail delivery method.
  • :location - The location of the sendmail executable. Defaults to /usr/sbin/sendmail.
  • :arguments - The command line arguments to be passed to sendmail. Defaults to -i -t.
| |raise_delivery_errors|Whether or not errors should be raised if the email fails to be delivered.| |delivery_method|Defines a delivery method. Possible values are :smtp (default), :sendmail, and :test.| |perform_deliveries|Determines whether deliver_* methods are actually carried out. By default they are, but this can be turned off to help functional testing.| @@ -510,4 +510,4 @@ h3. Changelog "Lighthouse ticket":http://rails.lighthouseapp.com/projects/16213/tickets/25 -* September 30, 2010: Fixed typos. "Jaime Iniesta":http://jaimeiniesta.com +* September 30, 2010: Fixed typos and reformatted Action Mailer configuration table for better understanding. "Jaime Iniesta":http://jaimeiniesta.com -- cgit v1.2.3 From a72edab3b319ebada1d674a6b2fdcf46ad62fbdb Mon Sep 17 00:00:00 2001 From: "Nicholas E. May (on Enterprise)" Date: Sat, 2 Oct 2010 21:57:01 -0500 Subject: Removed unnecessary 'the' in the '2.2.9 Active Suport' section of Getting Started. --- railties/guides/source/getting_started.textile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'railties/guides/source') diff --git a/railties/guides/source/getting_started.textile b/railties/guides/source/getting_started.textile index 92b9131b59..e6bf094b7d 100644 --- a/railties/guides/source/getting_started.textile +++ b/railties/guides/source/getting_started.textile @@ -110,7 +110,7 @@ Active Resource provides a framework for managing the connection between busines h5. Active Support -Active Support is an extensive collection of utility classes and standard Ruby library extensions that are used in the Rails, both by the core code and by your applications. +Active Support is an extensive collection of utility classes and standard Ruby library extensions that are used in Rails, both by the core code and by your applications. h5. Railties -- cgit v1.2.3 From ffe24354cc55a59ae5efafd69d51dd8e2c5f00fe Mon Sep 17 00:00:00 2001 From: "Nicholas E. May (on Enterprise)" Date: Sat, 2 Oct 2010 22:26:26 -0500 Subject: Section 3.2, table: 'README.rdoc' -> 'README' --- railties/guides/source/getting_started.textile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'railties/guides/source') diff --git a/railties/guides/source/getting_started.textile b/railties/guides/source/getting_started.textile index e6bf094b7d..41563a5704 100644 --- a/railties/guides/source/getting_started.textile +++ b/railties/guides/source/getting_started.textile @@ -175,7 +175,7 @@ In any case, Rails will create a folder in your working directory called blo |_.File/Folder|_.Purpose| |Gemfile|This file allows you to specify what gem dependencies are needed for your Rails application.| -|README.rdoc|This is a brief instruction manual for your application. Use it to tell others what your application does, how to set it up, and so on.| +|README|This is a brief instruction manual for your application. Use it to tell others what your application does, how to set it up, and so on.| |Rakefile|This file contains batch jobs that can be run from the terminal.| |app/|Contains the controllers, models, and views for your application. You'll focus on this folder for the remainder of this guide.| |config/|Configure your application's runtime rules, routes, database, and more.| -- cgit v1.2.3 From ab7b99f150ade08c079fc3425e23a297ea0a3e41 Mon Sep 17 00:00:00 2001 From: "Nicholas E. May (on Enterprise)" Date: Sat, 2 Oct 2010 22:43:45 -0500 Subject: Section 3.3: '# bundle install' instead of just 'bundle install' --- railties/guides/source/getting_started.textile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'railties/guides/source') diff --git a/railties/guides/source/getting_started.textile b/railties/guides/source/getting_started.textile index 41563a5704..ed2a4188db 100644 --- a/railties/guides/source/getting_started.textile +++ b/railties/guides/source/getting_started.textile @@ -195,7 +195,7 @@ h4. Installing the Required Gems Rails applications manage gem dependencies with "Bundler":http://gembundler.com/v1.0/index.html by default. As we don't need any other gems beyond the ones in the generated +Gemfile+ we can directly run -bundle install +# bundle install to have them ready. -- cgit v1.2.3 From bcc103367b2ad0c8f7bfabe0c4148b0cb9b19509 Mon Sep 17 00:00:00 2001 From: "Nicholas E. May (on Enterprise)" Date: Sat, 2 Oct 2010 23:05:08 -0500 Subject: Section 4.3, wrong word used: 'contact' => 'content' --- railties/guides/source/getting_started.textile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'railties/guides/source') diff --git a/railties/guides/source/getting_started.textile b/railties/guides/source/getting_started.textile index ed2a4188db..44203ae4f1 100644 --- a/railties/guides/source/getting_started.textile +++ b/railties/guides/source/getting_started.textile @@ -316,7 +316,7 @@ The first step to doing this is to delete the default page from your application $ rm public/index.html -We need to do this as Rails will deliver any static file in the +public+ directory in preference to any dynamic contact we generate from the controllers. +We need to do this as Rails will deliver any static file in the +public+ directory in preference to any dynamic content we generate from the controllers. Now, you have to tell Rails where your actual home page is located. Open the file +config/routes.rb+ in your editor. This is your application's _routing file_ which holds entries in a special DSL (domain-specific language) that tells Rails how to connect incoming requests to controllers and actions. This file contains many sample routes on commented lines, and one of them actually shows you how to connect the root of your site to a specific controller and action. Find the line beginning with +root :to+, uncomment it and change it like the following: -- cgit v1.2.3 From 467d20c897ba8e837b1ec67095482f57e8a78dfc Mon Sep 17 00:00:00 2001 From: "Nicholas E. May (on Enterprise)" Date: Sun, 3 Oct 2010 00:37:15 -0500 Subject: Section 6, table, typo (extra '.rb') --- railties/guides/source/getting_started.textile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'railties/guides/source') diff --git a/railties/guides/source/getting_started.textile b/railties/guides/source/getting_started.textile index 44203ae4f1..b2810188c2 100644 --- a/railties/guides/source/getting_started.textile +++ b/railties/guides/source/getting_started.textile @@ -352,7 +352,7 @@ NOTE. While scaffolding will get you up and running quickly, the "one size fits The scaffold generator will build 15 files in your application, along with some folders, and edit one more. Here's a quick overview of what it creates: |_.File |_.Purpose| -|db/migrate/20100207214725_create_posts.rb.rb |Migration to create the posts table in your database (your name will include a different timestamp)| +|db/migrate/20100207214725_create_posts.rb |Migration to create the posts table in your database (your name will include a different timestamp)| |app/models/post.rb |The Post model| |test/fixtures/posts.yml |Dummy posts for use in testing| |app/controllers/posts_controller.rb |The Posts controller| -- cgit v1.2.3