Fix bug when object_auth was only built but not created

This commit is contained in:
Christophe Vilayphiou 2012-05-22 16:52:12 +08:00
parent f497851fe3
commit dd4c1697cd
1 changed files with 1 additions and 1 deletions

View File

@ -34,7 +34,7 @@ module OrbitCoreLib
def get_object_auth_by_title(title)
oa = self.object_auths.where({title: title }).first
if oa.nil? && (self.class::ObjectAuthTitlesOptions.include? title)
oa = self.object_auths.build title: title
oa = self.object_auths.create title: title
end
oa
end