Sha256: 888548e02815356bf12085086342bfe6eb07133ebbae26811c2e49ab9de432d9
Contents?: true
Size: 469 Bytes
Versions: 5
Compression:
Stored size: 469 Bytes
Contents
class Actuality < ActiveRecord::Base translates :title, :content, :short_description belongs_to :administrator belongs_to :widget_actuality belongs_to :picture has_many :comments validates :title, :content, :presence => true acts_as_commentable def clone cloned = super cloned.translations = translations.clone unless translations.empty? return cloned end def activate self.update_attribute('active', !self.active ) end end
Version data entries
5 entries across 5 versions & 1 rubygems