Class: Scrivito::Workspace
- Inherits:
-
Object
- Object
- Scrivito::Workspace
- Defined in:
- lib/fiona7/scrivito_patches/workspace.rb
Class Method Summary collapse
-
.use(id_or_title) ⇒ Object
properly handle the only two workspaces.
Instance Method Summary collapse
-
#outdated? ⇒ Boolean
there are no outdated workspaces.
Class Method Details
.use(id_or_title) ⇒ Object
properly handle the only two workspaces
11 12 13 14 15 16 17 18 19 20 |
# File 'lib/fiona7/scrivito_patches/workspace.rb', line 11 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 |
Instance Method Details
#outdated? ⇒ Boolean
there are no outdated workspaces
6 7 8 |
# File 'lib/fiona7/scrivito_patches/workspace.rb', line 6 def outdated? false end |