tramway-page 1.0.0 → 1.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: b1da6db0d40ead5b01b1cc97f0eebfeafd1efd713442eb8b7de584a5bbd6a0fa
4
- data.tar.gz: 9130473305cc8e46cc6ce169c445dcf828beb237f8b6a65237ca9188394a447a
3
+ metadata.gz: 5e50446447940e414f5615757380f6746c372753b8f8e353b54418e6686b4908
4
+ data.tar.gz: ef630866914104ff6102e231b1c4736582ff8358a9f644a08853b958f05d135a
5
5
  SHA512:
6
- metadata.gz: 25d88d10bb314b04b98d19e8804fbd00612620771aa58a7fe44d749b3d078ec070a6d9e0b400592b7742fb29f793c3f5e468897a3cabfe5037b8e08eb8a8059a
7
- data.tar.gz: d30fb426f661a9316cb56320c0fc72ee386b47e51257342fdd085b408807efbb7789869490cad35b2a9df5195d37283f163c6775c8955c118343bd28d71049d8
6
+ metadata.gz: 9837ba36d692216cd487428dfa7857cb6afb12823faf0afc46382dd351393f37ee08f3be508574efed5aef7f83972ea37451e8161b740e353e8b6156b2d54c59
7
+ data.tar.gz: 83b39f33cbb5ddb7863cc9e4b5b9688187c831c1781cc300f965a699aaadfc73c4c342e8aa6da1556861d31dc05e68bdd10d8295e498d14d739bbec3f9a27d33
@@ -0,0 +1,11 @@
1
+ class Tramway::Page::PageDecorator < ::Tramway::Core::ApplicationDecorator
2
+ class << self
3
+ def collections
4
+ [ :all ]
5
+ end
6
+ end
7
+
8
+ def lead
9
+ object.body.first 200
10
+ end
11
+ end
@@ -0,0 +1,11 @@
1
+ class Tramway::Page::PageForm < ::Tramway::Core::ApplicationForm
2
+ properties :title, :body, :slug
3
+
4
+ def initialize(object)
5
+ form_object = super object
6
+ form_properties title: :string,
7
+ body: :ckeditor,
8
+ slug: :string
9
+ form_object
10
+ end
11
+ end
@@ -0,0 +1 @@
1
+ ::Tramway::Admin.set_available_models ::Tramway::Page::Page
@@ -1,5 +1,5 @@
1
1
  module Tramway
2
2
  module Page
3
- VERSION = '1.0.0'
3
+ VERSION = '1.1'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tramway-page
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: '1.1'
5
5
  platform: ruby
6
6
  authors:
7
7
  - Pavel Kalashnikov
@@ -25,11 +25,14 @@ files:
25
25
  - app/assets/stylesheets/tramway/page/application.css
26
26
  - app/controllers/tramway/page/application_controller.rb
27
27
  - app/controllers/tramway/page/pages_controller.rb
28
+ - app/decorators/tramway/page/page_decorator.rb
29
+ - app/forms/tramway/page/page_form.rb
28
30
  - app/helpers/tramway/page/application_helper.rb
29
31
  - app/jobs/tramway/page/application_job.rb
30
32
  - app/mailers/tramway/page/application_mailer.rb
31
33
  - app/models/tramway/page/page.rb
32
34
  - app/views/tramway/page/pages/show.html.haml
35
+ - config/initializers/tramway.rb
33
36
  - config/routes.rb
34
37
  - lib/tasks/tramway/page_tasks.rake
35
38
  - lib/tramway/page.rb