Sha256: 4880b818ed5b1aab821aa5346c5994be038370ab6ef7087ee6902189efa94484

Contents?: true

Size: 623 Bytes

Versions: 160

Compression:

Stored size: 623 Bytes

Contents

class Feature
  include Mongoid::Document
  include Mongoid::Timestamps

  field :name
  field :subhead

  field :image_path
  field :link_path
  field :partial_name
  field :inner_html
  field :weight, type: Integer, default: 10

  belongs_to :city, optional: true
  belongs_to :gallery, optional: true
  belongs_to :photo, optional: true
  belongs_to :report, optional: true
  belongs_to :site, optional: true
  belongs_to :tag, optional: true
  belongs_to :video, optional: true
  belongs_to :venue, optional: true

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

  def self.n_features
    4
  end

end

Version data entries

160 entries across 160 versions & 1 rubygems

Version Path
ish_models-3.0.0.1 lib/feature.rb
ish_models-0.0.33.304 lib/feature.rb
ish_models-0.0.33.303 lib/feature.rb
ish_models-0.0.33.302 lib/feature.rb
ish_models-0.0.33.301 lib/feature.rb
ish_models-0.0.33.300 lib/feature.rb
ish_models-0.0.33.299 lib/feature.rb
ish_models-0.0.33.298 lib/feature.rb
ish_models-0.0.33.297 lib/feature.rb
ish_models-0.0.33.296 lib/feature.rb
ish_models-0.0.33.295 lib/feature.rb
ish_models-0.0.33.294 lib/feature.rb
ish_models-0.0.33.293 lib/feature.rb
ish_models-0.0.33.292 lib/feature.rb
ish_models-0.0.33.291 lib/feature.rb
ish_models-0.0.33.287 lib/feature.rb
ish_models-0.0.33.286 lib/feature.rb
ish_models-0.0.33.285 lib/feature.rb
ish_models-0.0.33.284 lib/feature.rb
ish_models-0.0.33.283 lib/feature.rb