Showing 4 videos tagged with virtual attributes

Railscast - Episode 16: Virtual Attributes

00:03:41 railscasts.com
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.

Railscast - Episode 32: Time in Text Field

00:05:22 railscasts.com
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.

Railscast - Episode 165: Edit Multiple

00:14:26 railscasts.com
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!

Railscast - Episode 167: More on Virtual Attributes

00:07:44 railscasts.com
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.