Sha256: 745238696db46b2a605301ea55e71882c228faee45e9f32887c0498edacc2d9f
Contents?: true
Size: 670 Bytes
Versions: 1
Compression:
Stored size: 670 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 attr_reader :current_organization, :current_user, :current_feature def initialize(attributes = {}) @current_organization = attributes.delete("current_organization") || attributes.delete(:current_organization) @current_user = attributes.delete("current_user") || attributes.delete(:current_user) @current_feature = attributes.delete("current_feature") || attributes.delete(:current_feature) super end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
decidim-core-0.0.1 | app/forms/decidim/form.rb |