Sha256: 27dd9f2dc444af8e436c68cbbab3517cfd4fdea163210a6706f27676ac258bb1

Contents?: true

Size: 364 Bytes

Versions: 96

Compression:

Stored size: 364 Bytes

Contents

class Gallery < Noodall::Component
  many :promos
  key :title, String, :default => "Gallery"
  key :description, String
  key :asset_ids, Array, :typecast => 'ObjectId'
  
  
  def assets
    assets = Asset.all(:id => asset_ids)
    asset_ids.map do |id|
      assets.find{|a| a._id == id}
    end.compact
  end
  
  allowed_positions :small, :wide, :main
  
end

Version data entries

96 entries across 96 versions & 1 rubygems

Version Path
noodall-ui-0.1.15 demo/models/gallery.rb
noodall-ui-0.1.14 demo/models/gallery.rb
noodall-ui-0.1.13 demo/models/gallery.rb
noodall-ui-0.1.12 demo/models/gallery.rb
noodall-ui-0.1.11 demo/models/gallery.rb
noodall-ui-0.1.10 demo/models/gallery.rb
noodall-ui-0.1.9 demo/models/gallery.rb
noodall-ui-0.1.8 demo/models/gallery.rb
noodall-ui-0.1.6 demo/models/gallery.rb
noodall-ui-0.1.5 demo/models/gallery.rb
noodall-ui-0.1.4 demo/models/gallery.rb
noodall-ui-0.1.3 demo/models/gallery.rb
noodall-ui-0.1.2 demo/models/gallery.rb
noodall-ui-0.1.1 demo/models/gallery.rb
noodall-ui-0.1.0 demo/models/gallery.rb
noodall-ui-0.0.22 demo/models/gallery.rb
noodall-ui-0.0.21 demo/models/gallery.rb
noodall-ui-0.0.20 demo/models/gallery.rb
noodall-ui-0.0.19 demo/models/gallery.rb
noodall-ui-0.0.18 demo/models/gallery.rb