diff options
author | Julian Pawlowski <julian.pawlowski@gmail.com> | 2013-02-26 11:30:52 +0100 |
---|---|---|
committer | Julian Pawlowski <julian.pawlowski@gmail.com> | 2013-02-26 11:30:52 +0100 |
commit | 7c7b788d0d1aa1abe63b3506c4ced555de157fd5 (patch) | |
tree | b19e0056c97eccb910dd8c3c7df9ce76c0c2e47a /app/models | |
parent | 6c2ba1352010ef4c63b2dad1e90ab8b4366b0195 (diff) | |
parent | ececfdf24075dd4e2794734a07187750b1b33e13 (diff) |
Merge branches 'develop' and 'develop' of https://github.com/amooma/GS5 into develop
Diffstat (limited to 'app/models')
-rw-r--r-- | app/models/ability.rb | 1 | ||||
-rw-r--r-- | app/models/restore_job.rb | 13 |
2 files changed, 14 insertions, 0 deletions
diff --git a/app/models/ability.rb b/app/models/ability.rb index d886d53..690ee76 100644 --- a/app/models/ability.rb +++ b/app/models/ability.rb @@ -176,6 +176,7 @@ class Ability # can :create, GemeinschaftSetup can :manage, SipDomain + can [:create, :new, :show, :index], RestoreJob end end diff --git a/app/models/restore_job.rb b/app/models/restore_job.rb new file mode 100644 index 0000000..2c2da54 --- /dev/null +++ b/app/models/restore_job.rb @@ -0,0 +1,13 @@ +class RestoreJob < ActiveRecord::Base + attr_accessible :state, :backup_file + + mount_uploader :backup_file, BackupFileUploader + + def to_s + if self.backup_file? + File.basename(self.backup_file.to_s) + else + "RestoreJob ID #{self.id}" + end + end +end |