README.md in tramway-landing-3.0 vs README.md in tramway-landing-3.0.0.1

- old
+ new

@@ -9,16 +9,17 @@ Tramway-landing provides several types of blocks for main page. List of blocks: * Header +* Header with form * Footer * Block with text and image * Block with text, image and button * Cards * Features list -* Contacts +* Contacts, also Contacts without map * View * Just text * Link to the object All block's previews you can see at the bottom of this Readme @@ -142,20 +143,57 @@ -# your content for <head> ``` Then all your showing blocks will be on the main page. -## Blocks +## Migrate from tramway-landing 2.x to tramway-landing 3.x +#### 1. Add tramway-page gem to the Gemfile + +*Gemfile* +```ruby +gem 'tramway-page', '>= 1.4.1' +``` + +#### 2. Run install generator of tramway-page gem + +```shell +rails g tramway:page:install +``` + +#### 3. Run upgraded generator of tramway-landing gem + +```shell +rails g tramway:landing:install +``` + +#### 4. Create new Tramway::Page::Page object for main page + +```ruby +$> rails c +Tramway::Page::Page.create! title: 'Main page', page_type: :main +``` + +#### 5. Associate every Tramway::Landing::Block with the main page + +```ruby +$> rails c +Tramway::Landing::Block.update_all page_id: Tramway::Page::Page.last.id +``` + +## Blocks docs + How create blocks you can find here * [Header](https://github.com/ulmic/tramway-dev/blob/develop/tramway-landing/docs/header/main.md) +* Header with form * [Footer](https://github.com/ulmic/tramway-dev/blob/develop/tramway-landing/docs/footer/main.md) * [Block with text and image](https://github.com/ulmic/tramway-dev/blob/develop/tramway-landing/docs/block_with_text_and_image/main.md) * [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) * [Cards](https://github.com/ulmic/tramway-dev/blob/develop/tramway-landing/docs/cards/main.md) * [Features list](https://github.com/ulmic/tramway-dev/blob/develop/tramway-landing/docs/features/main.md) * [Contacts](https://github.com/ulmic/tramway-dev/blob/develop/tramway-landing/docs/contacts/main.md) +* Contacts without map * [View](https://github.com/ulmic/tramway-dev/blob/develop/tramway-landing/docs/view/main.md) * [Just text](https://github.com/ulmic/tramway-dev/blob/develop/tramway-landing/docs/just_text/main.md) * Link to object ## Contributing