lib/flex_attributes_filtered.rb
##
# flex_filtered allows you to easily programmatically control what attributes are allowed on your models
# It also provides several convienent helpers designed to make your life with a deterministic list of
# attributes more easy, such as "extended_attributes", "extended_attribute_names", and "write_extended_attributes"
# all of which contribute much sanity to making forms for these models.
#
# flex_filtered accepts the following options
# attribute_name_delegate::
#   if this is a method name, it will be called to determine a list of attribute_names
#   if this is an object or a relationship, please also specify
# attribute_name_delegate_method::
#   this will be called on the attribute_name_delegate. It should return a list of attributes


flex_filtered accepts the following options
attribute_name_delegate::
if this is a method name, it will be called to determine a list of attribute_names
if this is an object or a relationship, please also specify
attribute_name_delegate_method::
this will be called on the attribute_name_delegate. It should return a list of attributes
flex_filtered accepts the following options attribute_name_delegate :: if this is a method name it will be called to determine a list of attribute_names if this is an object or a relationship please also specify attribute_name_delegate_method :: this will be called on the attribute_name_delegate . It should return a list of attributes
def flex_filtered(options = {})
          options = {
            :attribute_name_delegate => nil,
            :attribute_name_delegate_method => nil
          }.merge(options)
          write_inheritable_attribute :flex_filtered_options, options
          class_inheritable_reader :flex_filtered_options
          include InstanceMethods
        end
def flex_filtered ( options = { } ) options = { :attribute_name_delegate => nil , :attribute_name_delegate_method => nil } . merge ( options ) write_inheritable_attribute :flex_filtered_options , options class_inheritable_reader :flex_filtered_options include InstanceMethods end
flex_filtered allows you to easily programmatically control what attributes are allowed on your models
It also provides several convienent helpers designed to make your life with a deterministic list of
attributes more easy, such as "extended_attributes", "extended_attribute_names", and "write_extended_attributes"
all of which contribute much sanity to making forms for these models.
flex_filtered allows you to easily programmatically control what attributes are allowed on your models It also provides several convienent helpers designed to make your life with a deterministic list of attributes more easy such as " extended_attributes " " extended_attribute_names " and " write_extended_attributes " all of which contribute much sanity to making forms for these models .
#extend ClassMethods # no class_methods yet :)
options