Skip to content

Commit

Permalink
copy edits [ci skip]
Browse files Browse the repository at this point in the history
  • Loading branch information
vijaydev committed Mar 9, 2013
1 parent 41b9e86 commit be3e402
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions guides/source/action_mailer_basics.md
Expand Up @@ -403,7 +403,7 @@ If you wish to override the default delivery options (e.g. SMTP credentials) whi


```ruby ```ruby
class UserMailer < ActionMailer::Base class UserMailer < ActionMailer::Base
def welcome_email(user,company) def welcome_email(user, company)
@user = user @user = user
@url = user_url(@user) @url = user_url(@user)
delivery_options = { user_name: company.smtp_user, password: company.smtp_password, address: company.smtp_host } delivery_options = { user_name: company.smtp_user, password: company.smtp_password, address: company.smtp_host }
Expand All @@ -414,12 +414,12 @@ end


### Sending Emails without Template Rendering ### Sending Emails without Template Rendering


There may be cases in which you want to skip the template rendering step and supply the email body as a string. You can achive this using the `:body` option. There may be cases in which you want to skip the template rendering step and supply the email body as a string. You can achieve this using the `:body` option.
In such cases don't forget to add the `:content_type` option. Rails will default to `text/plain` otherwise. In such cases don't forget to add the `:content_type` option. Rails will default to `text/plain` otherwise.


```ruby ```ruby
class UserMailer < ActionMailer::Base class UserMailer < ActionMailer::Base
def welcome_email(user,email_body) def welcome_email(user, email_body)
mail(to: user.email, body: email_body, content_type: "text/html", subject: "Already rendered!") mail(to: user.email, body: email_body, content_type: "text/html", subject: "Already rendered!")
end end
end end
Expand Down
2 changes: 1 addition & 1 deletion guides/source/active_record_querying.md
Expand Up @@ -1248,7 +1248,7 @@ User.where(state: 'inactive')
``` ```


As you can see above the `default_scope` is being overridden by both As you can see above the `default_scope` is being overridden by both
`scope` and `where` condition. `scope` and `where` conditions.




### Applying a default scope ### Applying a default scope
Expand Down

0 comments on commit be3e402

Please sign in to comment.