Sha256: 49789d2ba82d3a5cd59e3d9cad93075709506a8ce1a49fb09dabb9ef74dfad12

Contents?: true

Size: 449 Bytes

Versions: 13

Compression:

Stored size: 449 Bytes

Contents

# frozen_string_literal: true

module Decidim
  class FlagModalCell < Decidim::ViewModel
    include ActionView::Helpers::FormOptionsHelper

    def flag_user
      render
    end

    private

    def user_report_form
      Decidim::ReportForm.from_params(reason: "spam")
    end

    def modal_id
      options[:modal_id] || "flagModal"
    end

    def report_form
      @report_form ||= Decidim::ReportForm.new(reason: "spam")
    end
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
decidim-core-0.25.2 app/cells/decidim/flag_modal_cell.rb
decidim-core-0.25.1 app/cells/decidim/flag_modal_cell.rb
decidim-core-0.25.0 app/cells/decidim/flag_modal_cell.rb
decidim-core-0.25.0.rc4 app/cells/decidim/flag_modal_cell.rb
decidim-core-0.25.0.rc3 app/cells/decidim/flag_modal_cell.rb
decidim-core-0.25.0.rc2 app/cells/decidim/flag_modal_cell.rb
decidim-core-0.25.0.rc1 app/cells/decidim/flag_modal_cell.rb
decidim-core-0.24.3 app/cells/decidim/flag_modal_cell.rb
decidim-core-0.24.2 app/cells/decidim/flag_modal_cell.rb
decidim-core-0.24.1 app/cells/decidim/flag_modal_cell.rb
decidim-core-0.24.0 app/cells/decidim/flag_modal_cell.rb
decidim-core-0.24.0.rc2 app/cells/decidim/flag_modal_cell.rb
decidim-core-0.24.0.rc1 app/cells/decidim/flag_modal_cell.rb