diff options
Diffstat (limited to 'app/models/workbench.rb')
| -rw-r--r-- | app/models/workbench.rb | 4 | 
1 files changed, 4 insertions, 0 deletions
| diff --git a/app/models/workbench.rb b/app/models/workbench.rb index eb53af7aa..b6f90c7dc 100644 --- a/app/models/workbench.rb +++ b/app/models/workbench.rb @@ -42,6 +42,10 @@ class Workbench < ActiveRecord::Base      end    end +  def calendars +    workgroup.calendars.where('(organisation_id = ? OR shared = ?)', organisation.id, true) +  end +    def self.default      self.last if self.count == 1      where(name: DEFAULT_WORKBENCH_NAME).last | 
