Sha256: fc2ddb0b75bfafc23b03f974fa25d812d6818d051fee36e26f2a00c324f3d258

Contents?: true

Size: 439 Bytes

Versions: 14

Compression:

Stored size: 439 Bytes

Contents

class Chapter < ActiveRecord::Base
  self.primary_key = :name
  attr_accessible :id, :name
  has_one :assets, :class_name => "Chapters::Asset", :foreign_key => "chapter_name"
end
module Chapters
  class Asset < ActiveRecord::Base
    self.table_name = "chapters_assets"
    acts_as_assets base_model: :chapter, :foreign_key => :chapter_name
  end
end
module Chapters
  module Assets
    class Paragraph < Chapters::Asset
    end
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
acts_as_assets-0.4.1 spec/support/chapter.rb
acts_as_assets-0.4.0.3 spec/support/chapter.rb
acts_as_assets-0.4.0.2 spec/support/chapter.rb
acts_as_assets-0.4.0.1 spec/support/chapter.rb
acts_as_assets-0.4.0 spec/support/chapter.rb
acts_as_assets-0.3.8 spec/support/chapter.rb
acts_as_assets-0.3.7 spec/support/chapter.rb
acts_as_assets-0.3.6 spec/support/chapter.rb
acts_as_assets-0.3.5 spec/support/chapter.rb
acts_as_assets-0.3.4 spec/support/chapter.rb
acts_as_assets-0.3.3 spec/support/chapter.rb
acts_as_assets-0.3.2 spec/support/chapter.rb
acts_as_assets-0.3.1 spec/support/chapter.rb
acts_as_assets-0.3.0 spec/support/chapter.rb