Sha256: ec861d2227f366b647b4db0ebf61d82daaca1338b80c0656fd7b467b04986839
Contents?: true
Size: 707 Bytes
Versions: 11
Compression:
Stored size: 707 Bytes
Contents
# frozen_string_literal: true module Decidim module Accountability # Exposes result versions so users can see how a result # has been updated through time. class VersionsController < Decidim::Accountability::ApplicationController helper Decidim::TraceabilityHelper helper Decidim::Accountability::BreadcrumbHelper helper_method :current_version, :result private def result @result ||= Result.includes(:timeline_entries).where(feature: current_feature).find(params[:result_id]) end def current_version return nil if params[:id].to_i < 1 @current_version ||= result.versions[params[:id].to_i - 1] end end end end
Version data entries
11 entries across 11 versions & 1 rubygems