PayPlay.FM development.log

Friday, November 28, 2008

apache and %2F

If you are running rails on passenger and sometimes get apache internal 404 errors, this can be because by default apache doesn't handle urlencoded chars like '%2F' (/). In this case it won't even get to rails and will only appear in access_log with 404 status.

Solution is pretty simple - just add AllowEncodedSlashes On to virtual host section.

Labels: , ,

Friday, November 21, 2008

Mailer Callbacks: hooks for ActionMailer

I've just published tiny library that I wrote on weekend and gonna use on production.
It is an extension to ActionMailer that gives two useful callbacks for your mailer classes: before_deliver and after_deliver. "before_deliver" helps to cancel delivery under certain conditions, "after" filter is usually for saving/logging sent emails.

http://github.com/kelyar/mailer_callbacks

That was the first release but it is stable enough to work.

Labels: , ,

Tuesday, November 18, 2008

@page_title

I don't think that populating @page_title in controller's action, that can be seen in almost every controller, is the 100% right thing. Why controller if it surely belongs to view?

capture helper looks much more reasonable.

Labels: ,