Memo #6: Using named routes and url_for outside the controller in Ruby on Rails

Posted by Dmytro Shteflyuk on under Ruby & Rails (4,361 views)

Ruby on Rails Routing

Sometimes we need to write small console scripts which do some background processing on our models. In Scribd we are using Loops to run these tasks (check Alexey Kovyrin’s introduction post). One of our scripts supposed to generate some sort of html reports, and we need to generate links to our site there.

Read the rest of entry »

Тестирование мейлеров в RSpec

Posted by Dmytro Shteflyuk on under Ruby & Rails · English (21,319 views)

К сожалению, RSpec не предоставляет хелперы для тестирование мейлеров, вроде тех, что есть в TestUnit. Но добавить их в приложение совсем несложно, и в данной заметке я покажу, как это сделать.

Read the rest of entry »