Sha256: 41d7f611ab13c019d94ecf670de47a5e65c883afa35ff506e2d933a23e7a24c0

Contents?: true

Size: 420 Bytes

Versions: 2

Compression:

Stored size: 420 Bytes

Contents

module Viewable
  class FormPresenter < ViewPresenter
    def initialize(model, context)
      super
      if m.not_static?
        if m.structure.nil?
          m.create_structure!(viewable: m, email: ::Form::Email.new)
        end
        attributes = h.cms_form_instance.attributes
        attributes['structure_id'] = m.structure_id
        h.cms_form_instance = m.rows.build(attributes)
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
rails_admin_cms-0.0.2 app/presenters/viewable/form_presenter.rb
rails_admin_cms-0.0.1 app/presenters/viewable/form_presenter.rb