Sha256: c76022c3b3b9d84a098af10b9ee1b5ede7f8a917d8b433bd6af2c24bae541c3f

Contents?: true

Size: 523 Bytes

Versions: 8

Compression:

Stored size: 523 Bytes

Contents

class SunrisePost < Sunrise::AbstractModel
  self.resource_name = "Post"
  
  association :structure
  
  list :thumbs do    
    field :title
    field :updated_at
    field :id
    
    group :search do
      field :title
      field :structure_id
    end
  end
  
  edit do
    field :title
    field :content
    field :is_visible
  end
  
  list :export do
    scope { Post.includes(:structure) }
    
    field :id
    field :title
    field :created_at
    field :structure_title
    field :structure_slug
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
sunrise-cms-0.5.0.rc2 spec/dummy/app/models/sunrise/sunrise_post.rb
sunrise-cms-0.5.0.rc1 spec/dummy/app/models/sunrise/sunrise_post.rb
sunrise-cms-0.4.2 spec/dummy/app/models/sunrise_post.rb
sunrise-cms-0.4.1 spec/dummy/app/models/sunrise_post.rb
sunrise-cms-0.4.0 spec/dummy/app/models/sunrise_post.rb
sunrise-cms-0.3.3 spec/dummy/app/models/sunrise_post.rb
sunrise-cms-0.3.2 spec/dummy/app/models/sunrise_post.rb
sunrise-cms-0.3.1 spec/dummy/app/models/sunrise_post.rb