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.5.15 spec/dummy/app/models/gallery.rb
noodall-ui-0.5.14 spec/dummy/app/models/gallery.rb
noodall-ui-0.5.13 spec/dummy/app/models/gallery.rb
noodall-ui-0.5.12 spec/dummy/app/models/gallery.rb
noodall-ui-0.5.11 spec/dummy/app/models/gallery.rb
noodall-ui-0.4.11 demo/models/gallery.rb
noodall-ui-0.4.10 demo/models/gallery.rb
noodall-ui-0.5.10 spec/dummy/app/models/gallery.rb
noodall-ui-0.5.9 spec/dummy/app/models/gallery.rb
noodall-ui-0.4.9 demo/models/gallery.rb
noodall-ui-0.5.8 spec/dummy/app/models/gallery.rb
noodall-ui-0.4.8 demo/models/gallery.rb
noodall-ui-0.4.7 demo/models/gallery.rb
noodall-ui-0.5.7 spec/dummy/app/models/gallery.rb
noodall-ui-0.5.6 spec/dummy/app/models/gallery.rb
noodall-ui-0.5.5 spec/dummy/app/models/gallery.rb
noodall-ui-0.5.4 spec/dummy/app/models/gallery.rb
noodall-ui-0.5.3 spec/dummy/app/models/gallery.rb
noodall-ui-0.5.2 spec/dummy/app/models/gallery.rb
noodall-ui-0.5.1 spec/dummy/app/models/gallery.rb