lib/flex_attributes_filtered.rb
##
# extended_attributes
# Since the flex_attributes don't show up in the model's attributes hash, this is an easy substitute.
# returns a hash of attr_name => value pairs for this model. Capital!
extended_attributes
Since the flex_attributes don't show up in the model's attributes hash, this is an easy substitute.
returns a hash of attr_name => value pairs for this model. Capital!
extended_attributes Since the flex_attributes don ' t show up in the model ' s attributes hash this is an easy substitute . returns a hash of attr_name = > value pairs for this model . Capital!
def extended_attributes(reload = false)
          return @extended_attributes if @extended_attributes && !reload
          @extended_attributes ||= {}
          values = extended_attribute_names.map { |attr| self.send(attr) }
          extended_attribute_names.zip(values).each do |attr|
            @extended_attributes[attr[0].to_s] = attr[1]
          end
          @extended_attributes
        end
def extended_attributes ( reload = false ) return @extended_attributes if @extended_attributes && ! reload @extended_attributes ||= { } values = extended_attribute_names . map { | attr | self . send ( attr ) } extended_attribute_names . zip ( values ) . each do | attr | @extended_attributes [ attr [ 0 ] . to_s ] = attr [ 1 ] end @extended_attributes end
extended_attributes
Since the flex_attributes don't show up in the model's attributes hash, this is an easy substitute.
extended_attributes Since the flex_attributes don ' t show up in the model ' s attributes hash this is an easy substitute .
# k = attr[0], v = attr[1]
reload