Sha256: d2183656229f35424729b2e3ec13c06c64583adf5329da8bd4ecb2a0fa104473
Contents?: true
Size: 665 Bytes
Versions: 18
Compression:
Stored size: 665 Bytes
Contents
require 'scrivito/workspace' module Scrivito class Workspace # there are no conflicts. def conflict_warning_for(*args) [] end # there are no outdated workspaces def outdated? false end # properly handle the only two workspaces def self.use(id_or_title) self.current = if id_or_title =~ /(published|rtc)/ find(id_or_title) else find_by_title(id_or_title) or raise ResourceNotFound, "Could not find #{self} with title #{id_or_title}" end rescue ResourceNotFound raise ResourceNotFound, %{Could not find #{self} with title or ID "#{id_or_title}"} end end end
Version data entries
18 entries across 18 versions & 1 rubygems