app/models/decidim/accountability/status.rb in decidim-accountability-0.26.10 vs app/models/decidim/accountability/status.rb in decidim-accountability-0.27.0.rc1

- old
+ new

@@ -5,10 +5,12 @@ # The data store for a Status in the Decidim::Accountability component. It stores a # key, a localized name, a localized description and and associated progress number. class Status < Accountability::ApplicationRecord include Decidim::HasComponent include Decidim::TranslatableResource + include Decidim::FilterableResource + include Decidim::Traceable component_manifest_name "accountability" translatable_fields :name, :description @@ -16,11 +18,13 @@ validates :key, presence: true, uniqueness: { scope: :decidim_component_id } validates :name, presence: true # Allow ransacker to search for a key in a hstore column (`name`.`en`) - ransacker :name do |parent| - Arel::Nodes::InfixOperation.new("->>", parent.table[:name], Arel::Nodes.build_quoted(I18n.locale.to_s)) + ransacker_i18n :name + + def self.log_presenter_class_for(_log) + Decidim::Accountability::AdminLog::StatusPresenter end end end end