Sha256: 80bdc995fa1ca41e180478149ff84cf381e6fe922f3f4fecc7a3e181e960d1aa

Contents?: true

Size: 528 Bytes

Versions: 9

Compression:

Stored size: 528 Bytes

Contents

require 'kaminari/models/active_record_extension'

module ActiveAdmin

  # manually initialize kaminari for this model
  ::ActiveRecord::Base.send :include, Kaminari::ActiveRecordExtension

  class Comment < ActiveRecord::Base
    self.table_name = "active_admin_comments"

    belongs_to :resource, :polymorphic => true
    belongs_to :author, :polymorphic => true

    validates_presence_of :resource_id
    validates_presence_of :resource_type
    validates_presence_of :body
    validates_presence_of :namespace
  end

end

Version data entries

9 entries across 9 versions & 4 rubygems

Version Path
andrewroth_activeadmin-0.3.4 lib/active_admin/comments/comment.rb
activeadmin-0.3.4 lib/active_admin/comments/comment.rb
activeadmin-0.3.3 lib/active_admin/comments/comment.rb
activeadmin-0.3.2 lib/active_admin/comments/comment.rb
activeadmin-0.3.1 lib/active_admin/comments/comment.rb
activeadmin-0.3.0 lib/active_admin/comments/comment.rb
nsm-activeadmin-0.2.2 lib/active_admin/comments/comment.rb
saulolso-activeadmin-0.2.2.1 lib/active_admin/comments/comment.rb
saulolso-activeadmin-0.2.2 lib/active_admin/comments/comment.rb