tram-page 0.1.2 → 0.1.3

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
  SHA1:
3
- metadata.gz: 3e6f890492190b88aa4e356208fab524e810fd85
4
- data.tar.gz: a4ee37fe4e2cc9ecbc9998015c8bff2b8c42bcba
3
+ metadata.gz: c39d55da08ebcfb0ee2795121e7e0d6a96a20495
4
+ data.tar.gz: 6d077605bc9ea6266773a6ba1e40144536d28bd8
5
5
  SHA512:
6
- metadata.gz: 740b34535c4e5084d0683bf5b6d8a99b1b2938ba8ba97f25e1cc118d2bdc026f38262f3113db21f46e8d35d5fdb74edc93add3234782d3691ba62450ec75649e
7
- data.tar.gz: 5ee8db1856d0e06a39d71101ef2758c86a3374af212e6b856b99b7cb0f233a78b8b552eccc274f620ef97f497cb18b92c74fbd8255142a59ba1a5c6579bf8980
6
+ metadata.gz: c461d73b487fccfd57f8388e7c4acf9a37c715ff1560f92f422761f682dbf4b8e647c13a38a4a7f1bc9a9b5e1ba7b8beb6766b4704b0539938d109e7087dd638
7
+ data.tar.gz: 230b8bf61933bf31376b25f4b664c511d7bc92a830a08ef029c745858959087d4bccc00cc119bf0d5d10d9eaaf34fc231ee34da65f3a5c640926fe5fd6c0be67
data/README.md CHANGED
@@ -24,17 +24,20 @@ Or install it yourself as:
24
24
  class class IndexPage < Tram::Page
25
25
  # See dry-initializer
26
26
  param :account
27
- option :readonly, optional: true
27
+ option :readonly, optional: true
28
28
 
29
29
  # Delegate to Rails.application.routes.url_helpers module
30
30
  url_helper :index_url
31
31
 
32
32
  section :collection
33
33
  section :readonly, method: :readonly_on?
34
-
34
+
35
+ # IndexPage#title will be defined
36
+ section :title, value: -> { account.title }
37
+
35
38
  # Usable in section methods as well
36
39
  section :index_url
37
-
40
+
38
41
  def collection
39
42
  # ...
40
43
  end
data/lib/tram/page.rb CHANGED
@@ -43,7 +43,7 @@ class Tram::Page
43
43
 
44
44
  def t(key)
45
45
  raise "I18n is not defined" unless defined?(I18n)
46
- I18n.t key, scope: [self.class.i18n_scope, self.class.name.underscore]
46
+ I18n.t key, scope: [Tram::Page.i18n_scope, self.class.name.underscore]
47
47
  end
48
48
 
49
49
  def page_methods(options)
@@ -3,6 +3,6 @@
3
3
  # rubocop:disable Style/ClassAndModuleChildren
4
4
  module Tram
5
5
  class Page
6
- VERSION = "0.1.2"
6
+ VERSION = "0.1.3"
7
7
  end
8
8
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tram-page
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Viktor Sokolov