app/models/data_object.rb
# The only filter allowed right now is :published.
The only filter allowed right now is :published.
The only filter allowed right now is : published .
def uncached_data_object_taxa(options = {})
    @data_object_taxa ||= {}
    cache_key = Marshal.dump(options)
    return @data_object_taxa[cache_key] if @data_object_taxa.has_key?(cache_key)
    assocs = (options[:published] == true) ?
      published_entries.clone :
      curated_hierarchy_entries.clone
    assocs << DataObjectTaxon.new(latest_published_users_data_object) if latest_published_users_data_object
    [ :vetted_id, :visibility_id ].each do |param|
      if options[param]
        values = options[param]
        values = [ values ] if values.class == Fixnum
        assocs.delete_if{ |a| ! values.include?(a.send(param)) }
      end
    end
    @data_object_taxa[cache_key] = assocs || []
  end
def uncached_data_object_taxa ( options = { } ) @data_object_taxa ||= { } cache_key = Marshal . dump ( options ) return @data_object_taxa [ cache_key ] if @data_object_taxa . has_key? ( cache_key ) assocs = ( options [ :published ] == true ) ? published_entries . clone : curated_hierarchy_entries . clone assocs << DataObjectTaxon . new ( latest_published_users_data_object ) if latest_published_users_data_object [ :vetted_id , :visibility_id ] . each do | param | if options [ param ] values = options [ param ] values = [ values ] if values . class == Fixnum assocs . delete_if { | a | ! values . include? ( a . send ( param ) ) } end end @data_object_taxa [ cache_key ] = assocs || [ ] end
The only filter allowed right now is :published.
The only filter allowed right now is : published .
options
<not_specific>