Changeset 1383

Show
Ignore:
Timestamp:
03/08/07 13:45:55 (1 year ago)
Author:
pdcawley
Message:

populate the pluralized instance variable for top level resources

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • plugins/acts_as_resource/lib/pdcawley/action_controller/resourceful.rb

    r1362 r1383  
    6464          @resource_chain << instance_variable_set(instance_var_name_for(resource_class, :plural), 
    6565                                                   parent.send(resource_class.name.underscore.pluralize)) 
     66        elsif key_chain.empty? 
     67          @resource_chain << instance_variable_set(instance_var_name_for(resource_class, :plural) 
     68                                                   resource_class.find(:all)) 
    6669        end 
    6770      end