diff --git a/lib/frederick_api/v2/resource.rb b/lib/frederick_api/v2/resource.rb index 9bb7d16..1340719 100644 --- a/lib/frederick_api/v2/resource.rb +++ b/lib/frederick_api/v2/resource.rb @@ -21,7 +21,7 @@ def self.all_records end def self.top_level_namespace - self.to_s.split('::').first.constantize + @top_level_namespace ||= self.to_s.split('::').first.constantize end def self.site diff --git a/lib/frederick_api/version.rb b/lib/frederick_api/version.rb index 75c5470..d072d21 100644 --- a/lib/frederick_api/version.rb +++ b/lib/frederick_api/version.rb @@ -2,5 +2,5 @@ module FrederickAPI # Current gem version - VERSION = '0.1.6' + VERSION = '0.1.7' end