What's New in Edge Rails: ActionMailer::Base.server_settings Deprecated

Posted by ryan
at 10:55 AM on Wednesday, January 31, 2007

Configuring your action mailer settings just got a little tweak that you’re going to want to pay attention to, especially if you’re running off edge. Instead of using ActionMailer::Base.server_settings you’re going to want to use ActionMailer::Base.smtp_settings. The syntax remains the same, it’s just a name change:

1
2
3
4
5
6
7
ActionMailer::Base.delivery_method = :smtp
ActionMailer::Base.smtp_settings = {
        :address                => "smtp.mymailserver.com",
        :authentication        => :login,
        :user_name                => "me",
        :password                => "password"
}

In the 1-2-stable rails branch the use of server_settings has been deprecated, while over in edge it’s been renamed outright and you’ll need to update your usage.

Also in the same update is the ability to specify your sendmail executable location and command line arguments options with the new ActionMailer::Base.sendmail_settings (if you’re using sendmail):

1
2
3
4
5
ActionMailer::Base.delivery_method = :sendmail
ActionMailer::Base.sendmail_settings = { 
  :location       => '/usr/sbin/sendmail', 
  :arguments      => '-i -t'
} 

See the ActionMailer::Base api for further option details.

tags: rubyonrails, rails

Rails Hackfest 2007 Announcement 12

Posted by ryan
at 2:21 PM on Monday, January 29, 2007

The Rails Hackfest 2007 list of winners is up and it looks like I’m fortunate enough to be listed. Much gratitude to Derek (like we’re on a first-name basis) for sponsoring the contest.

tags: rubyonrails, rails, railsconf2007

What's New in Edge Rails: 1.month.from_now.no_longer.effed

Posted by ryan
at 10:10 AM on Friday, January 26, 2007

Brian Donovan has a great writeup of his new Duration fix to the Rails’ Time convenience methods that, until now, have been slightly broken.

Here’s the summary. Before (bad):

1
2
3
4
Time.now
#=> Thu Jan 25 21:01:31 -0800 2007
1.month.from_now
#=> Sat Feb 24 21:01:34 -0800 2007

Oops – apparently one month only equals 30 days, not really one month. But now, in edge:

1
2
3
4
Time.now
#=> Thu Jan 25 21:01:31 -0800 2007
1.month.from_now
#=> Sun Feb 25 21:01:34 -0800 2007

And check out this little inspect goodie:

1
2
>> 3.weeks
#=> 21 days

And just so you’re not mislead by this post’s title, this fix applies to all the time helpers, not just month.from_now. Read the full rundown to become fully enlightened.

tags: rubyonrails, rails

Rails Cookbook Released (w/ Rails 1.2 Content)

Posted by ryan
at 8:21 AM on Friday, January 19, 2007

The aforementioned Rails Cookbook from O’Reilly, to which I made a minute contribution, has been released… including Rails 1.2 relevant content like ActiveResource and RESTful development.

Go getcha one.

(Here is a full TOC for the curious amongst you)

So You Want to Learn ActiveResource...

Posted by ryan
at 11:10 PM on Wednesday, January 17, 2007

But you can’t find much info on the subject? Stay tuned to this little teaser to learn ActiveResource in a live, real-world scenario.

Rela.tv and Gr.egario.us Taken Down

Posted by ryan
at 10:03 PM on Wednesday, January 10, 2007

As part of a larger consolidation effort I have taken down Rela.tv and gr.egario.us. They were mostly play apps for me and I’m moving on to other things. As my boss tells me, “you don’t want to dilute your brand…”

For the curious or nostalgic amongst you, you can get the source for both from my subversion repository:

Rela.tv source

svn co https://saucyworks.devguard.com/svn/projects/rela.tv/trunk rela.tv

gr.egario.us source

svn co https://saucyworks.devguard.com/svn/projects/gr.egario.us/trunk gr.egario.us

And if either of these domain names appeals to you, let me know. I’m willing to transfer them over to you if you have a project or cause that speaks to me (and even if you don’t have such a cause…)

tags: , , ,