summaryrefslogtreecommitdiffstats
path: root/acf/model/init.lua
diff options
context:
space:
mode:
Diffstat (limited to 'acf/model/init.lua')
-rw-r--r--acf/model/init.lua6
1 files changed, 6 insertions, 0 deletions
diff --git a/acf/model/init.lua b/acf/model/init.lua
index d8212cb..9b061ef 100644
--- a/acf/model/init.lua
+++ b/acf/model/init.lua
@@ -134,6 +134,12 @@ function Collection:init(params, itype)
self.widget = self.dtype
end
+function Collection:auto_ui_name(name)
+ if not name then return end
+ if string.sub(name, -1, -1) ~= 's' then name = name..'s' end
+ return super(self, Collection):auto_ui_name(name)
+end
+
function Collection:load(context, create)
if not self.iparams.field then self.iparams.field = to_field(self.type) end
return super(self, Collection):load(context, create)