Sha256: 996a49fc41c5e13542392acecce945963577e1658dcbe21b65028ac8f97f861f

Contents?: true

Size: 328 Bytes

Versions: 5

Compression:

Stored size: 328 Bytes

Contents

class <%= name %> < ActiveRecord::Base

    validates_presence_of :title, :published_at, :announce, :announce_image, :body

    mount_uploader :announce_image, <%= @announce_image_uploader_name %>

    scope :ordered, -> { order('created_at DESC')}
    scope :feed, -> { where(published: true).order('published_at DESC') }

end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
coalla-cms-0.4.2.0 lib/generators/coalla/cms/news/templates/entity.rb.erb
coalla-cms-0.5.2.4 lib/generators/coalla/cms/news/templates/entity.rb.erb
coalla-cms-0.4.4.3 lib/generators/coalla/cms/news/templates/entity.rb.erb
coalla-cms-0.5.1.9 lib/generators/coalla/cms/news/templates/entity.rb.erb
coalla-cms-0.5.1.8 lib/generators/coalla/cms/news/templates/entity.rb.erb