Sha256: 3a9cee9d1300a385ed44d7147f87f64b1b06a1c4020da21dab31e328fb8a75fc

Contents?: true

Size: 507 Bytes

Versions: 6

Compression:

Stored size: 507 Bytes

Contents

# frozen_string_literal: true

module Decidim
  # A base form object to hold common logic, like automatically adding as
  # public method the params sent as context by the `FormFactory` concern.
  class Form < Rectify::Form
    delegate :current_organization,
             :current_user,
             :current_feature,
             :current_participatory_space,
             to: :context, prefix: false, allow_nil: true

    delegate :available_locales, to: :current_organization, allow_nil: true
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
decidim-core-0.10.1 app/forms/decidim/form.rb
decidim-core-0.10.0 app/forms/decidim/form.rb
decidim-core-0.9.3 app/forms/decidim/form.rb
decidim-core-0.9.2 app/forms/decidim/form.rb
decidim-core-0.9.1 app/forms/decidim/form.rb
decidim-core-0.9.0 app/forms/decidim/form.rb