[email protected] wrote:
> From: Tomas Sedovic <[email protected]>
>
> ---
>  src/app/models/hardware_profile.rb |    5 +++--
>  1 files changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/src/app/models/hardware_profile.rb 
> b/src/app/models/hardware_profile.rb
> index b65fc24..8330388 100644
> --- a/src/app/models/hardware_profile.rb
> +++ b/src/app/models/hardware_profile.rb
> @@ -42,11 +42,12 @@ class HardwareProfile < ActiveRecord::Base
>    validates_uniqueness_of :external_key, :scope => [:provider_id, :pool_id]
>  
>    validates_presence_of :name
> +  validates_uniqueness_of :name
>  
>    validates_presence_of :storage
> -  validates_numericality_of :storage
> +  validates_numericality_of :storage, :greater_than => 0
>    validates_presence_of :memory
> -  validates_numericality_of :memory
> +  validates_numericality_of :memory, :greater_than => 0
>  
>    validates_presence_of :architecture, :if => :provider
>  
>   
It works now with rails 2.3.4.

ACK to patches 1 and 2

Scott
_______________________________________________
deltacloud-devel mailing list
[email protected]
https://fedorahosted.org/mailman/listinfo/deltacloud-devel

Reply via email to