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 +4 -4
- data/README.md +6 -3
- data/lib/tram/page.rb +1 -1
- data/lib/tram/page/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c39d55da08ebcfb0ee2795121e7e0d6a96a20495
|
4
|
+
data.tar.gz: 6d077605bc9ea6266773a6ba1e40144536d28bd8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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: [
|
46
|
+
I18n.t key, scope: [Tram::Page.i18n_scope, self.class.name.underscore]
|
47
47
|
end
|
48
48
|
|
49
49
|
def page_methods(options)
|
data/lib/tram/page/version.rb
CHANGED