diff options
author | Kamil Trzcinski <ayufan@ayufan.eu> | 2016-06-11 00:36:54 +0300 |
---|---|---|
committer | Kamil Trzcinski <ayufan@ayufan.eu> | 2016-06-11 00:36:54 +0300 |
commit | 907c0e6796b69f9577c147dd489cf55748c749ac (patch) | |
tree | c4db6a3d3785fa845be98447eb4303b548ab7809 /app/models/environment.rb | |
parent | cf7da039bedcad5163ce9deedccc94206d4c485a (diff) |
Added initial version of deployments
Diffstat (limited to 'app/models/environment.rb')
-rw-r--r-- | app/models/environment.rb | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/app/models/environment.rb b/app/models/environment.rb new file mode 100644 index 00000000000..623404ba634 --- /dev/null +++ b/app/models/environment.rb @@ -0,0 +1,11 @@ +class Environment < ActiveRecord::Base + belongs_to :project + + has_many :deployments + + validates_presence_of :name + + def last_deployment + deployments.last + end +end |