lib/flex_attributes_filtered.rb
##
# extended_attribute_names
# returns an array of permissable attribute names for this model.
# uses the delegate options if specified, otherwise tries flex_options[:fields]
extended_attribute_names
returns an array of permissable attribute names for this model.
uses the delegate options if specified, otherwise tries flex_options[:fields]
extended_attribute_names returns an array of permissable attribute names for this model . uses the delegate options if specified otherwise tries flex_options [ : fields ]
def extended_attribute_names
          return @attribute_names if @attribute_names
          @attribute_names ||= []
          if flex_filtered_options[:attribute_name_delegate]
            delegate = flex_filtered_options[:attribute_name_delegate]
            method = flex_filtered_options[:attribute_name_delegate_method]
            @attribute_names = (method) ?
              (delegate = self.send(delegate)
              delegate.send(method) rescue []) :
              self.send(delegate)
          else
            @attribute_names = flex_options[:fields] rescue []
          end
          @attribute_names
        end
def extended_attribute_names return @attribute_names if @attribute_names @attribute_names ||= [ ] if flex_filtered_options [ :attribute_name_delegate ] delegate = flex_filtered_options [ :attribute_name_delegate ] method = flex_filtered_options [ :attribute_name_delegate_method ] @attribute_names = ( method ) ? ( delegate = self . send ( delegate ) delegate . send ( method ) rescue [ ] ) : self . send ( delegate ) else @attribute_names = flex_options [ :fields ] rescue [ ] end @attribute_names end
extended_attribute_names
returns an array of permissable attribute names for this model.
extended_attribute_names returns an array of permissable attribute names for this model .