app/forms/admin/tramway/landing/block_form.rb in tramway-landing-2.1.0.2 vs app/forms/admin/tramway/landing/block_form.rb in tramway-landing-2.2

- old
+ new

@@ -1,10 +1,10 @@ # frozen_string_literal: true class Admin::Tramway::Landing::BlockForm < ::Tramway::Core::ExtendedApplicationForm properties :title, :background, :view_state_event, :block_type, :position, :navbar_link, :anchor, :description, - :link_object_type, :link_object_id, :button_title, :button_link, :view_name + :link_object_type, :link_object_id, :button_title, :button_link, :view_name, :form_url def initialize(object = nil) super(object).tap do form_properties title: :string, background: :file, @@ -18,11 +18,12 @@ navbar_link: :default, anchor: :string, description: :ckeditor, button_title: :string, button_link: :string, - view_name: :string + view_name: :string, + form_url: :string end end def button_title model.button ||= {} @@ -41,8 +42,14 @@ end def button_link=(value) model.button ||= {} model.button[:link] = value + model.save + end + + def form_url=(value) + model.values ||= {} + model.values.merge! form_url: value model.save end end