tramway-landing 1.5.1.2 → 1.5.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 818a6e38ee292d464e62d207d2e308c49f27478c7c769328a6539fcee2997d83
4
- data.tar.gz: 7e2cf264c421102c9dae51287329a08336ab031a190d904c4ab6d0b7b003c5f5
3
+ metadata.gz: f92978218d6d6c9751bf5c8f8135d444504ba137bc772266d5d42703bea79d4b
4
+ data.tar.gz: c2839c6545ccb380e79d62661f762060287fcd75cc5973c0c642ae70766122fe
5
5
  SHA512:
6
- metadata.gz: df014c67e774a728a984d2184c9a507085a8007b8692b980a06a706d3982475a30ad799a447ff336ead3599418e5b48cd03d028498564cb7344f2c9d9d04c0a0
7
- data.tar.gz: 1ccbf053b0f31b4ba732237f387e5b8c3decf191bce0b1a35b746890a31ce7acf3ec41869a4706cd1718bfec6dab397c388aaf3c95d98b32f3c938e80bff7d2d
6
+ metadata.gz: 79ceaa2df73103cf77ea54d3307f18a4b893bec14262cb339c8a513cc099657ac7e1fc63b6e920b55ceb5325bd75aea73c4f14a819afde62022faa69917f3cfb
7
+ data.tar.gz: 4d0d29e7eade2d05f41f31104b2c2388d097fb467ed42e65f0932165394b310c3352e13d32107d84509cd4bf0871d9f61e49140a07bc9d8c93d6c483c336c1c4
@@ -1,5 +1,5 @@
1
- class Tramway::Landing::BlockForm < ::Tramway::Core::ApplicationForm
2
- properties :title, :background, :view_state, :block_type, :position, :navbar_link, :anchor, :description, :link_object_type, :link_object_id, :button
1
+ class Tramway::Landing::BlockForm < ::Tramway::Core::ExtendedApplicationForm
2
+ properties :title, :background, :view_state, :block_type, :position, :navbar_link, :anchor, :description, :link_object_type, :link_object_id, :button_title, :button_link
3
3
 
4
4
  def initialize(object = nil)
5
5
  form_object = super object
@@ -18,19 +18,23 @@ class Tramway::Landing::BlockForm < ::Tramway::Core::ApplicationForm
18
18
  end
19
19
 
20
20
  def button_title
21
- model.button&.require(:title) || ""
21
+ model.button ||= {}
22
+ model.button['title'] || ""
22
23
  end
23
24
 
24
25
  def button_link
25
- model.button&.require(:link) || ""
26
+ model.button ||= {}
27
+ model.button['link'] || ""
26
28
  end
27
29
 
28
30
  def button_title=(value)
31
+ model.button ||= {}
29
32
  model.button[:title] = value
30
33
  model.save
31
34
  end
32
35
 
33
36
  def button_link=(value)
37
+ model.button ||= {}
34
38
  model.button[:link] = value
35
39
  model.save
36
40
  end
@@ -1,5 +1,5 @@
1
1
  module Tramway
2
2
  module Landing
3
- VERSION = '1.5.1.2'
3
+ VERSION = '1.5.2'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tramway-landing
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.5.1.2
4
+ version: 1.5.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Pavel Kalashnikov
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-05-05 00:00:00.000000000 Z
11
+ date: 2019-06-06 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Landing Engine for your Rails projects
14
14
  email: