Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Usage

ramontayag edited this page · 7 revisions

First, you should know when to use it.

  • Definitely more expensive than normal attributes
  • Can easily complicate your app if overused

Knowing that, checkout:

  1. Adding a dynamic attribute to a record
  2. Removing a dynamic attribute from a record
  3. Fetching dynamic attribute details
  4. Checking if something is a dynamic attribute: dynamic_attribute?(:some_attribute) # Returns true or false
  5. Dynamic find
  6. Mimicking ActiveRecord
  7. Inheriting attributes
  8. Ordering by a dynamic attribute
  9. Find records with specific dynamic attributes using where_dynamic_attribute
  10. Learn the shortcuts
Something went wrong with that request. Please try again.