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.3.15 demo/models/gallery.rb
noodall-ui-0.3.14 demo/models/gallery.rb
noodall-ui-0.3.13 demo/models/gallery.rb
noodall-ui-0.3.12 demo/models/gallery.rb
noodall-ui-0.3.11 demo/models/gallery.rb
noodall-ui-0.3.8 demo/models/gallery.rb
noodall-ui-0.3.7 demo/models/gallery.rb
noodall-ui-0.3.6 demo/models/gallery.rb
noodall-ui-0.3.5 demo/models/gallery.rb
noodall-ui-0.3.4 demo/models/gallery.rb
noodall-ui-0.3.3 demo/models/gallery.rb
noodall-ui-0.3.2 demo/models/gallery.rb
noodall-ui-0.3.1 demo/models/gallery.rb
noodall-ui-0.3.0 demo/models/gallery.rb
noodall-ui-0.2.3 demo/models/gallery.rb
noodall-ui-0.2.2 demo/models/gallery.rb
noodall-ui-0.2.1 demo/models/gallery.rb
noodall-ui-0.2.0 demo/models/gallery.rb
noodall-ui-0.1.17 demo/models/gallery.rb
noodall-ui-0.1.16 demo/models/gallery.rb