Sha256: 2848028e9595952cf116684b7e298ad1ba597e49ad6b8eea3b76e7a367d0b9ff

Contents?: true

Size: 710 Bytes

Versions: 23

Compression:

Stored size: 710 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
  belongs_to :report
  belongs_to :gallery
  belongs_to :video
  # 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

23 entries across 23 versions & 1 rubygems

Version Path
ish_models-0.0.33.20 lib/feature.rb
ish_models-0.0.33.19 lib/feature.rb
ish_models-0.0.33.18 lib/feature.rb
ish_models-0.0.33.17 lib/feature.rb
ish_models-0.0.33.16 lib/feature.rb
ish_models-0.0.33.15 lib/feature.rb
ish_models-0.0.33.14 lib/feature.rb
ish_models-0.0.33.13 lib/feature.rb
ish_models-0.0.33.12 lib/feature.rb
ish_models-0.0.33.11 lib/feature.rb
ish_models-0.0.33.10 lib/feature.rb
ish_models-0.0.33.8 lib/feature.rb
ish_models-0.0.33.7 lib/feature.rb
ish_models-0.0.33.6 lib/feature.rb
ish_models-0.0.33.5 lib/feature.rb
ish_models-0.0.33 lib/feature.rb
ish_models-0.0.32 lib/feature.rb
ish_models-0.0.31 lib/feature.rb
ish_models-0.0.30 lib/feature.rb
ish_models-0.0.29.10 lib/feature.rb