Sha256: 22bd90b2e077bc8a060b2f5d44f440ebfa2889f46f7839f23376a969205c8455

Contents?: true

Size: 255 Bytes

Versions: 18

Compression:

Stored size: 255 Bytes

Contents

class Blog < ActiveRecord::Base
  belongs_to :author
  has_many :comments

  scope :featured, ->{ where(:featured => true) }
  scope :exclude_inactive, ->{ where(active: true) }

  def self.ransackable_scopes(auth = nil)
    [:exclude_inactive]
  end
end

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
brightcontent-core-2.6.0 spec/dummy/app/models/blog.rb
brightcontent-core-2.5.1 spec/dummy/app/models/blog.rb
brightcontent-core-2.5.0 spec/dummy/app/models/blog.rb
brightcontent-core-2.4.6 spec/dummy/app/models/blog.rb
brightcontent-core-2.4.5 spec/dummy/app/models/blog.rb
brightcontent-core-2.4.4 spec/dummy/app/models/blog.rb
brightcontent-core-2.4.3 spec/dummy/app/models/blog.rb
brightcontent-core-2.4.2 spec/dummy/app/models/blog.rb
brightcontent-core-2.4.1 spec/dummy/app/models/blog.rb
brightcontent-core-2.4.0 spec/dummy/app/models/blog.rb
brightcontent-core-2.3.4 spec/dummy/app/models/blog.rb
brightcontent-core-2.3.3 spec/dummy/app/models/blog.rb
brightcontent-core-2.3.2 spec/dummy/app/models/blog.rb
brightcontent-core-2.3.1 spec/dummy/app/models/blog.rb
brightcontent-core-2.3.0 spec/dummy/app/models/blog.rb
brightcontent-core-2.2.2 spec/dummy/app/models/blog.rb
brightcontent-core-2.2.1 spec/dummy/app/models/blog.rb
brightcontent-core-2.2.0 spec/dummy/app/models/blog.rb