Rename legislation process final_version_publication phase name to more descriptive result_publication

This commit is contained in:
Bertocq
2017-06-13 19:59:49 +02:00
parent edee908fc1
commit e55328caf4
8 changed files with 22 additions and 22 deletions

View File

@@ -19,7 +19,7 @@ module Abilities
can [:read, :print], Budget::Investment
can :read_results, Budget, phase: "finished"
can :new, DirectMessage
can [:read, :debate, :draft_publication, :allegations, :final_version_publication], Legislation::Process
can [:read, :debate, :draft_publication, :allegations, :result_publication], Legislation::Process
can [:read, :changes, :go_to_version], Legislation::DraftVersion
can [:read], Legislation::Question
can [:create], Legislation::Answer

View File

@@ -29,8 +29,8 @@ class Legislation::Process < ActiveRecord::Base
active_phase?(:draft_publication) && today >= draft_publication_date
when :allegations
active_phase?(:allegations) && today >= allegations_start_date && today <= allegations_end_date
when :final_version_publication
active_phase?(:final_version_publication) && today >= final_publication_date
when :result_publication
active_phase?(:result_publication) && today >= final_publication_date
end
end
@@ -45,8 +45,8 @@ class Legislation::Process < ActiveRecord::Base
active_phase?(:draft_publication) && today >= draft_publication_date
when :allegations
active_phase?(:allegations) && today >= allegations_start_date
when :final_version_publication
active_phase?(:final_version_publication) && today >= final_publication_date
when :result_publication
active_phase?(:result_publication) && today >= final_publication_date
end
end
@@ -58,7 +58,7 @@ class Legislation::Process < ActiveRecord::Base
draft_publication_date.present?
when :allegations
allegations_start_date.present? && allegations_end_date.present?
when :final_version_publication
when :result_publication
final_publication_date.present?
end
end