module Bithex::ActiveRecord::ClassMethods
Bithex
attributes are defined like this:
class Upload < ActiveRecord::Base bithex :foo, :bar, :baz end
Public Instance Methods
bithex(*definitions)
click to toggle source
# File lib/bithex/active_record.rb, line 11 def bithex(*definitions) definitions.each do |name| attr = attribute_alias?(name) ? attribute_alias(name) : name decorate_attribute_type(attr, :bithex) do |subtype| Bithex::Type.new(attr, subtype) end end end