Sha256: b7846ac89b7c006ee4fb5743141e48537fc897fb345718f264a165e29ec8de39

Contents?: true

Size: 374 Bytes

Versions: 16

Compression:

Stored size: 374 Bytes

Contents

module QueryVersionSupport
  def retrieve_query_version
    query_version_id = params.fetch(:query_version_id, 'latest')
    @query_version ||= if query_version_id == 'latest'
      query_versions.first
    else
      QueryVersion.find(query_version_id)
    end
  end

  def query_versions
    QueryVersion.where(query_id: params[:query_id]).order('version DESC')
  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
aleph_analytics-0.4.9.pre.dev lib/query_version_support.rb
aleph_analytics-0.4.8 lib/query_version_support.rb
aleph_analytics-0.4.7 lib/query_version_support.rb
aleph_analytics-0.4.4 lib/query_version_support.rb
aleph_analytics-0.4.2 lib/query_version_support.rb
aleph_analytics-0.4.1 lib/query_version_support.rb
aleph_analytics-0.3.0 lib/query_version_support.rb
aleph_analytics-0.2.0 lib/query_version_support.rb
aleph_analytics-0.1.0 lib/query_version_support.rb
aleph_analytics-0.0.6 lib/query_version_support.rb
aleph_analytics-0.0.5 lib/query_version_support.rb
aleph_analytics-0.0.4 lib/query_version_support.rb
aleph_analytics-0.0.3 lib/query_version_support.rb
aleph_analytics-0.0.2 lib/query_version_support.rb
aleph_analytics-0.0.1.alpha lib/query_version_support.rb
aleph_analytics-0.0.0.alpha lib/query_version_support.rb