Sha256: cdf5105ea4f96dffa154ecdb9a657ad2be9d60cff7934152185d27e02b999930

Contents?: true

Size: 464 Bytes

Versions: 10

Compression:

Stored size: 464 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,
             to: :context, prefix: false, allow_nil: true

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

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
decidim-core-0.8.4 app/forms/decidim/form.rb
decidim-core-0.8.3 app/forms/decidim/form.rb
decidim-core-0.8.2 app/forms/decidim/form.rb
decidim-core-0.8.1 app/forms/decidim/form.rb
decidim-core-0.8.0 app/forms/decidim/form.rb
decidim-core-0.7.4 app/forms/decidim/form.rb
decidim-core-0.7.3 app/forms/decidim/form.rb
decidim-core-0.7.2 app/forms/decidim/form.rb
decidim-core-0.7.1 app/forms/decidim/form.rb
decidim-core-0.7.0 app/forms/decidim/form.rb