Class: ArticlesCategory

Inherits:
ActiveRecord::Base
  • Object
show all
Defined in:
app/models/articles_category.rb

Instance Method Summary collapse

Instance Method Details

#validateObject



7
8
9
10
11
# File 'app/models/articles_category.rb', line 7

def validate 
  if self.category_id.to_i <= 0
    errors.add("Category_id", "cant be zero")
  end
end