Tag Archives: Rails

Rails3, RSpec2 and WebMock

Yesterday we were deep in the middle of coding using RSpec 2 and Rails 3 and needed to verify that a method made a specific http request. I happily discovered WebMock, which appears to be a next generation FakeWeb. Originally developed by Bartosz Blimke, I was happy to see that Sam Phillips had it working [...]

rails: adding a preview option to new form

Suppose we wanted to modify a basic Rails application so there was the option of a preview before creating a new record. What is a good pattern for adding a second button to a form? There are two options: One controller action with a flag: nice articles by EyeDeal and Myers Development (from 2008 and [...]

Notes from Rails 3 bugmash

Blazing Cloud hosted a “Do One Thing for Rails 3″ bugmash and Workshop curriculum hacksession. We had four participants: Melanie Archer (@mejarc) Karen Zeller (@karenzeller8) Sharon Lee Sarah Allen (@ultrasaurus) We followed wycats instructions for getting started. Some pre-conditions that weren’t spelled out: Ruby 1.8.7 is required, which implies a re-install of rubygems (you need [...]

Simple Email Form with ActionMailer

Working with ActionMailer is a bit different from working with ActiveRecord. While it makes sense to me that you would have a model for the data of the email message you send, the flow of control seems inverted from the rest of Rails. With ActionMailer call the model from the controller, then the model triggers [...]