only add id to the name if there is one

This commit is contained in:
Jeena Paradies 2010-06-18 23:36:31 +02:00
parent 3215572541
commit a4d8f1ab84

View file

@ -11,8 +11,10 @@ module ActionController
unless filename = options.delete(:plist_filename)
if plist.is_a? Array
filename = plist.first.class.name.pluralize + ".plist"
else
elsif plist.respond_to?(:id)
filename = "#{plist.class.name}-#{plist.id}.plist"
else
filename = "#{plist.class.name}-data.plist"
end
end