lib/scrivito/workspace.rb in scrivito_sdk-1.9.1 vs lib/scrivito/workspace.rb in scrivito_sdk-1.10.0.rc1
- old
+ new
@@ -383,29 +383,25 @@
if Workspace.current == self
Workspace.current = Workspace.published
end
end
- class << self
- private
-
- def from_workspace_data(id, data)
- unless data
- raise ResourceNotFound, "Could not find #{self} with id #{id}"
- end
-
- cache[id] = Workspace.new(data)
+ private_class_method def self.from_workspace_data(id, data)
+ unless data
+ raise ResourceNotFound, "Could not find #{self} with id #{id}"
end
- def warn_backend_not_available(error_message)
- Warning.warn <<-EOS
+ cache[id] = Workspace.new(data)
+ end
- Couldn't connect to backend to fetch published workspace.
- #{error_message}
- Serving from cache.
+ private_class_method def self.warn_backend_not_available(error_message)
+ Warning.warn <<-EOS
- EOS
- end
+ Couldn't connect to backend to fetch published workspace.
+ #{error_message}
+ Serving from cache.
+
+ EOS
end
end
end