Sha256: be6315ffb10a120b5cbacb0e307ab50525b98802c22d2f0bcfe9fa623616b4f1

Contents?: true

Size: 418 Bytes

Versions: 7

Compression:

Stored size: 418 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 :foreign_key => "chapter_name"
  end
end
module Chapters
  module Assets
    class Paragraph < Chapters::Asset
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
acts_as_assets-0.2.6 spec/support/chapter.rb
acts_as_assets-0.2.5 spec/support/chapter.rb
acts_as_assets-0.2.4 spec/support/chapter.rb
acts_as_assets-0.2.3 spec/support/chapter.rb
acts_as_assets-0.2.2 spec/support/chapter.rb
acts_as_assets-0.2.1 spec/support/chapter.rb
acts_as_assets-0.2.0 spec/support/chapter.rb