#16 Virtual Attributes (revised) Jul 20, 2012 | 11 minutes | Active Record , Forms Virtual attributes are a clean way to add form fields that do not map directly to the database. Here I show how to handle validations, associations, and more. Subscribe to Watch Episode Tweet Show Notes...

StarTrader added about 2 hours later: I like the implementation as a concept, but I am concerned about what the results would be for client code. This would seem to encourage the creation of an arbitrarily large number of Error classes. To my mind the goal of raising an error is to ha...

Related:

Posted March 17, 2008 at 9:48 AM | Permalink You probably should make a clearer distinction between Ferret and acts_as_ferret. Ferret is the underlying Ruby implemention of Lucene. It provides generic full-text searching. Acts_as_ferret is a nice Rails plugin that integrates Ferret wi...

For Rails 3.1, we wanted a mostly-compatible solution with the same programmer benefits as the existing model, but with all the benefits of automatic flushing. After a number of very long discussions on the topic, José Valim came up with the idea of using Ruby 1.9 fibers to jump back ...

Rails Ticket 4339 suggests that there is a denial-of-service vulnerability because of the way the Rails request handler instantiates a symbol for every incoming request method. This is technically true, but turns out not to matter, as seen below. help i’m allocated and i can’t get rel...

Related:

Almost all email clients leave quoting of original email text when you reply. If Redmine users do not manually remove these overquotings when replying to Redmine issue emails, this commonly useless text will be posted in the end of comment. It would be nice if Redmine was able to trim...

, I gave you some introductory information on Cucumber, a great framework for writing and executing high level descriptions of your software’s functionality. In this post, I’ll take a deeper dive and talk about a few more advanced Cucumber topics: project structures, multiple language...

Related:

Rails is a web application development framework written in the Ruby language. It is designed to make programming web applications easier by making assumptions about what every developer needs to get started. It allows you to write less code while accomplishing more than many other la...