Sha256: b3d8886fe8bbb4d2c834ef9f6c856a2f8184f464ecbf419d542cea6fd148ba16

Contents?: true

Size: 258 Bytes

Versions: 8

Compression:

Stored size: 258 Bytes

Contents

class AvailabilityZone < ActiveRecord::Base

  has_many :servers, inverse_of: :availability_zone
  has_many :volumes, inverse_of: :availability_zone

  before_validation :set_region

  def set_region
    self.region = self.name.gsub(/[a-z]$/, '')
  end

end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
crop-duster-0.0.14 lib/models/availability_zone.rb
crop-duster-0.0.13 lib/models/availability_zone.rb
crop-duster-0.0.12 lib/models/availability_zone.rb
crop-duster-0.0.11 lib/models/availability_zone.rb
crop-duster-0.0.10 lib/models/availability_zone.rb
crop-duster-0.0.9 lib/models/availability_zone.rb
crop-duster-0.0.8 lib/models/availability_zone.rb
crop-duster-0.0.7 lib/models/availability_zone.rb