From dd4c1697cd2970a33b8f9277859d7d4aeacdd6d6 Mon Sep 17 00:00:00 2001 From: Christophe Vilayphiou Date: Tue, 22 May 2012 16:52:12 +0800 Subject: [PATCH] Fix bug when object_auth was only built but not created --- lib/orbit_core_lib.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/orbit_core_lib.rb b/lib/orbit_core_lib.rb index fcabad78c..f3cd2cd51 100644 --- a/lib/orbit_core_lib.rb +++ b/lib/orbit_core_lib.rb @@ -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