Sha256: ab0a53d657261f6d3eb5ee8850b84f82cd6c57f74fceed8f888656a5a0a918c2

Contents?: true

Size: 279 Bytes

Versions: 5

Compression:

Stored size: 279 Bytes

Contents

class Repo < ActiveRecord::Base
  include ReportsKit::Model

  has_many :issues

  reports_kit do
    contextual_filter :for_repo, ->(relation, context_params) { context_params ? relation.where(id: context_params[:repo_id]) : relation }
  end

  def to_s
    full_name
  end
end

Version data entries

5 entries across 5 versions & 2 rubygems

Version Path
reports_kits-0.7.8 spec/support/models/repo.rb
reports_kits-0.7.7 spec/support/models/repo.rb
reports_kit-0.7.1 spec/support/models/repo.rb
reports_kit-0.7.0 spec/support/models/repo.rb
reports_kit-0.5.0 spec/support/models/repo.rb