tramway-landing 3.0 → 3.0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5c53d44bd00c343f41a392098028bedd928f33a0a9305e50c50d426fa76ba9c3
4
- data.tar.gz: 23ab8448186dc62de60f8a2a26762097f8741225bdcdb21cc95d2852288c6705
3
+ metadata.gz: a858bf426aae65cd94c66d7585362a45325e45143b71dd71b545cc802599651e
4
+ data.tar.gz: 662a4a8d294b05a9d18a4ab66a368149ba20ecd801898629c00ad04eca06f0e6
5
5
  SHA512:
6
- metadata.gz: cc1a6376e6e9d4bc23d4fbed7810712088be120c9ea452cd56b804b3035110d40d1faefc68c9c1f66b61d3a5eaf71124987ad0afdaf2631be6be9837ea102e7e
7
- data.tar.gz: 3ddfcf47ad89f8ee03f9625ecc72ffaaf9fc35a28c80ee7cc2159d2a5b8cb5648bef981c6eac26da773e60af99f917e1c183fbced3a22c0320c615dd9bcc7d57
6
+ metadata.gz: 108aee3bc02a9db5b39f5501c61daf96eeb5fa0781e27760f0399d86df77c2cb63dba515aa37e3dc9e3cd1b9aace3ff775d2654283e300f429cec38d104a0963
7
+ data.tar.gz: f66279ef8b9a055cb3043e07dba9b3111d3c71477264e4bdce8c1133fd8d496f17d531aa14fa0e61745dc032d05929f44b89e85461d70ad8d346c12c90990fe0
data/README.md CHANGED
@@ -11,12 +11,13 @@ Tramway-landing provides several types of blocks for main page.
11
11
  List of blocks:
12
12
 
13
13
  * Header
14
+ * Header with form
14
15
  * Footer
15
16
  * Block with text and image
16
17
  * Block with text, image and button
17
18
  * Cards
18
19
  * Features list
19
- * Contacts
20
+ * Contacts, also Contacts without map
20
21
  * View
21
22
  * Just text
22
23
  * Link to the object
@@ -144,17 +145,54 @@ It will push this content to `<head>` tag only on main page. You aren't able to
144
145
 
145
146
  Then all your showing blocks will be on the main page.
146
147
 
147
- ## Blocks
148
+ ## Migrate from tramway-landing 2.x to tramway-landing 3.x
149
+
150
+ #### 1. Add tramway-page gem to the Gemfile
151
+
152
+ *Gemfile*
153
+ ```ruby
154
+ gem 'tramway-page', '>= 1.4.1'
155
+ ```
156
+
157
+ #### 2. Run install generator of tramway-page gem
158
+
159
+ ```shell
160
+ rails g tramway:page:install
161
+ ```
162
+
163
+ #### 3. Run upgraded generator of tramway-landing gem
164
+
165
+ ```shell
166
+ rails g tramway:landing:install
167
+ ```
168
+
169
+ #### 4. Create new Tramway::Page::Page object for main page
170
+
171
+ ```ruby
172
+ $> rails c
173
+ Tramway::Page::Page.create! title: 'Main page', page_type: :main
174
+ ```
175
+
176
+ #### 5. Associate every Tramway::Landing::Block with the main page
177
+
178
+ ```ruby
179
+ $> rails c
180
+ Tramway::Landing::Block.update_all page_id: Tramway::Page::Page.last.id
181
+ ```
182
+
183
+ ## Blocks docs
148
184
 
149
185
  How create blocks you can find here
150
186
 
151
187
  * [Header](https://github.com/ulmic/tramway-dev/blob/develop/tramway-landing/docs/header/main.md)
188
+ * Header with form
152
189
  * [Footer](https://github.com/ulmic/tramway-dev/blob/develop/tramway-landing/docs/footer/main.md)
153
190
  * [Block with text and image](https://github.com/ulmic/tramway-dev/blob/develop/tramway-landing/docs/block_with_text_and_image/main.md)
154
191
  * [Block with text, image and button](https://github.com/ulmic/tramway-dev/blob/develop/tramway-landing/docs/block_with_text_image_and_button/main.md)
155
192
  * [Cards](https://github.com/ulmic/tramway-dev/blob/develop/tramway-landing/docs/cards/main.md)
156
193
  * [Features list](https://github.com/ulmic/tramway-dev/blob/develop/tramway-landing/docs/features/main.md)
157
194
  * [Contacts](https://github.com/ulmic/tramway-dev/blob/develop/tramway-landing/docs/contacts/main.md)
195
+ * Contacts without map
158
196
  * [View](https://github.com/ulmic/tramway-dev/blob/develop/tramway-landing/docs/view/main.md)
159
197
  * [Just text](https://github.com/ulmic/tramway-dev/blob/develop/tramway-landing/docs/just_text/main.md)
160
198
  * Link to object
@@ -32,6 +32,7 @@ class Tramway::Landing::Block < ::Tramway::Landing::ApplicationRecord
32
32
  scope :with_navbar_link, -> { where navbar_link: :exist }
33
33
  scope :header, -> { on_main_page.where(block_type: :header).first }
34
34
  scope :footer, -> { on_main_page.where(block_type: :footer).first }
35
+ scope :published, -> { where(view_state: :published) }
35
36
 
36
37
  def link_object
37
38
  link_object_type.constantize.find link_object_id
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Tramway
4
4
  module Landing
5
- VERSION = '3.0'
5
+ VERSION = '3.0.0.1'
6
6
  end
7
7
  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: '3.0'
4
+ version: 3.0.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - moshinaan
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-04-03 00:00:00.000000000 Z
11
+ date: 2020-04-04 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Landing Engine for your Rails projects
14
14
  email: