Keep your controllers clean and forms flexible by adding virtual attributes to your model. This very powerful technique allows you to create form fields which may not directly relate to the database.
Although Rails does allow you to edit time attributes with text fields, it's not very flexible. In this episode you will learn how to use a virtual attribute to format the time to your liking.
Use checkboxes to select multiple records and edit them all in one form as shown in this episode. With virtual attributes you can even edit values relatively!
Use a virtual attribute to implement a simple tagging feature. In this episode I show you how to assign virtual attributes through a callback instead of a setter method.
RubyTu.be is a community driven collection of Ruby related videos and screencasts. Questions? Comments? Contact RubyTu.be via e-mail or click on the Feedback GetSatisfaction widget found on the other side of the page.