only add id to the name if there is one
This commit is contained in:
parent
3215572541
commit
a4d8f1ab84
1 changed files with 3 additions and 1 deletions
|
@ -11,8 +11,10 @@ module ActionController
|
||||||
unless filename = options.delete(:plist_filename)
|
unless filename = options.delete(:plist_filename)
|
||||||
if plist.is_a? Array
|
if plist.is_a? Array
|
||||||
filename = plist.first.class.name.pluralize + ".plist"
|
filename = plist.first.class.name.pluralize + ".plist"
|
||||||
else
|
elsif plist.respond_to?(:id)
|
||||||
filename = "#{plist.class.name}-#{plist.id}.plist"
|
filename = "#{plist.class.name}-#{plist.id}.plist"
|
||||||
|
else
|
||||||
|
filename = "#{plist.class.name}-data.plist"
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Reference in a new issue