Sha256: 305b9336b079b96d70b47b6ed1ef03a6c02e322857f8d567f6aae152edb83a3c

Contents?: true

Size: 440 Bytes

Versions: 11

Compression:

Stored size: 440 Bytes

Contents

class Banner < ActiveRecord::Base
  # Scopes, attachments, etc.
  include Forge::Reorderable
  scope :published, -> { where(:published => true) }
  has_attached_file :photo, :styles => {:banner => "800x800>", :thumbnail => "120x108#"}, :default_style => :banner
  can_use_asset_for :photo

  # Validations
  validates_presence_of :title
  validates_attachment_presence :photo
  # open up everything for mass assignment
  attr_protected
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
forge-cli-0.1.10 lib/forge/app/models/banner.rb
forge-cli-0.1.9 lib/forge/app/models/banner.rb
forge-cli-0.1.8 lib/forge/app/models/banner.rb
forge-cli-0.1.7 lib/forge/app/models/banner.rb
forge-cli-0.1.6 lib/forge/app/models/banner.rb
forge-cli-0.1.5 lib/forge/app/models/banner.rb
forge-cli-0.1.4 lib/forge/app/models/banner.rb
forge-cli-0.1.3 lib/forge/app/models/banner.rb
forge-cli-0.1.2 lib/forge/app/models/banner.rb
forge-cli-0.1.1 lib/forge/app/models/banner.rb
forge-cli-0.1.0 lib/forge/app/models/banner.rb