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)
|
||||
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
|
||||
|
||||
|
|
Reference in a new issue