Sha256: f6f73a723a5ff4527a211c9d61baf45346c1509363d4fd34892aeeb4e1e02518
Contents?: true
Size: 540 Bytes
Versions: 3
Compression:
Stored size: 540 Bytes
Contents
module Polygallery class Gallery < ActiveRecord::Base attr_accessor :settings DEFAULTS = { :association => { :class_name => 'Polygallery::Gallery', :as => :galleryable, :dependent => :destroy }, :nested_attributes => {}, :validates => {} } belongs_to :galleryable, :polymorphic => true has_many :photos, :class_name => 'Polygallery::Photo' accepts_nested_attributes_for :photos after_initialize do self.photos.build end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
polygallery-0.0.3 | app/models/polygallery/gallery.rb |
polygallery-0.0.2 | app/models/polygallery/gallery.rb |
polygallery-0.0.1 | app/models/polygallery/gallery.rb |