Sha256: a7d3d9ec0f4b4d3d86da4648adb07f6538a19790f87e4b8a7ad2d067588dae70

Contents?: true

Size: 786 Bytes

Versions: 103

Compression:

Stored size: 786 Bytes

Contents

class Feature  

  include Mongoid::Document
  include Mongoid::Timestamps

  field :name,    :type => String
  field :subhead, :type => String

  field :image_path,   :type => String
  field :link_path,    :type => String
  field :partial_name, :type => String
  field :inner_html,   :type => String
  field :weight,       :type => Integer, :default => 10
  
  belongs_to :photo, :optional => true
  belongs_to :report, :optional => true
  belongs_to :gallery, :optional => true
  belongs_to :video, :optional => true
  # has_one :photo
  # has_one :report
  # has_one :gallery
  # has_one :video

  embedded_in :venue
  embedded_in :site
  embedded_in :city
  embedded_in :tag

  def self.all
    self.order_by( :created_at => :desc )
  end

  def self.n_features
    4
  end
  
end

Version data entries

103 entries across 103 versions & 1 rubygems

Version Path
ish_models-0.0.33.135 lib/feature.rb
ish_models-0.0.33.134 lib/feature.rb
ish_models-0.0.33.133 lib/feature.rb
ish_models-0.0.33.132 lib/feature.rb
ish_models-0.0.33.131 lib/feature.rb
ish_models-0.0.33.130 lib/feature.rb
ish_models-0.0.33.129 lib/feature.rb
ish_models-0.0.33.128 lib/feature.rb
ish_models-0.0.33.127 lib/feature.rb
ish_models-0.0.33.124 lib/feature.rb
ish_models-0.0.33.123 lib/feature.rb
ish_models-0.0.33.122 lib/feature.rb
ish_models-0.0.33.121 lib/feature.rb
ish_models-0.0.33.120 lib/feature.rb
ish_models-0.0.33.119 lib/feature.rb
ish_models-0.0.33.118 lib/feature.rb
ish_models-0.0.33.117 lib/feature.rb
ish_models-0.0.33.116 lib/feature.rb
ish_models-0.0.33.115 lib/feature.rb
ish_models-0.0.33.114 lib/feature.rb