Sha256: cadb00f00a44bd19ef1d4243e11ed3569671bf827d08339501cdb29715b4b806

Contents?: true

Size: 402 Bytes

Versions: 31

Compression:

Stored size: 402 Bytes

Contents

module Blogit
  module Blogs

    def self.included(base)
      base.extend ClassMethods
    end
    
    module ClassMethods
      
      # When called within a model (usually User) this creates
      # a has-many assosciation between the model and Blogit::Post
      def blogs
        has_many :blog_posts, :as => "blogger", :class_name => "Blogit::Post"
      end
            
    end
    
  end
end

Version data entries

31 entries across 31 versions & 1 rubygems

Version Path
blogit-1.0.0.rc1 lib/blogit/blogs.rb
blogit-0.8.0 lib/blogit/blogs.rb
blogit-0.7.0 lib/blogit/blogs.rb
blogit-0.6.0 lib/blogit/blogs.rb
blogit-0.5.1 lib/blogit/blogs.rb
blogit-0.5.0 lib/blogit/blogs.rb
blogit-0.4.8 lib/blogit/blogs.rb
blogit-0.4.7 lib/blogit/blogs.rb
blogit-0.4.6 lib/blogit/blogs.rb
blogit-0.4.5 lib/blogit/blogs.rb
blogit-0.4.4 lib/blogit/blogs.rb
blogit-0.4.3 lib/blogit/blogs.rb
blogit-0.4.2 lib/blogit/blogs.rb
blogit-0.4.1 lib/blogit/blogs.rb
blogit-0.4.0 lib/blogit/blogs.rb
blogit-0.3.2 lib/blogit/blogs.rb
blogit-0.3.1 lib/blogit/blogs.rb
blogit-0.3.0 lib/blogit/blogs.rb
blogit-0.2.1 lib/blogit/blogs.rb
blogit-0.2.0 lib/blogit/blogs.rb