Sha256: e25971458a86446f48e1aaf6e34bcc92747d3fd96a7da05e9ac38839b519e631

Contents?: true

Size: 287 Bytes

Versions: 21

Compression:

Stored size: 287 Bytes

Contents

class Post < ActiveRecord::Base
  has_many :comments
  if Rails.rails4?
    has_many :admin_comments, -> { where author: "Admin" }, :class_name => "Comment"
  else
    has_many :admin_comments, :class_name => "Comment", :conditions => { :author => "Admin" }
  end
  has_many :people
end

Version data entries

21 entries across 21 versions & 4 rubygems

Version Path
cm-admin-1.5.22 vendor/bundle/ruby/3.3.0/gems/cocoon-1.2.15/spec/dummy/app/models/post.rb
cm-admin-1.5.21 vendor/bundle/ruby/3.3.0/gems/cocoon-1.2.15/spec/dummy/app/models/post.rb
cm-admin-1.5.20 vendor/bundle/ruby/3.3.0/gems/cocoon-1.2.15/spec/dummy/app/models/post.rb
cocoon-1.2.15 spec/dummy/app/models/post.rb
cocoon-1.2.14 spec/dummy/app/models/post.rb
cocoon-1.2.13 spec/dummy/app/models/post.rb
cocoon-1.2.12 spec/dummy/app/models/post.rb
cocoon-1.2.11 spec/dummy/app/models/post.rb
cocoon-1.2.10 spec/dummy/app/models/post.rb
enju_leaf-1.2.1 vendor/bundle/ruby/2.3/gems/cocoon-1.2.9/spec/dummy/app/models/post.rb
cocoon-1.2.9 spec/dummy/app/models/post.rb
cocoon-1.2.8 spec/dummy/app/models/post.rb
cocoon-1.2.7 spec/dummy/app/models/post.rb
sc_core-0.0.7 test/dummy/vendor/bundle/ruby/2.2.0/gems/cocoon-1.2.6/spec/dummy/app/models/post.rb
cocoon-1.2.6 spec/dummy/app/models/post.rb
cocoon-1.2.5 spec/dummy/app/models/post.rb
cocoon-1.2.4 spec/dummy/app/models/post.rb
cocoon-1.2.3 spec/dummy/app/models/post.rb
cocoon-1.2.2 spec/dummy/app/models/post.rb
cocoon-1.2.1 spec/dummy/app/models/post.rb