metricky 0.7.0 → 0.7.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +3 -1
- data/lib/metricky/period.rb +1 -2
- data/lib/metricky/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 50d0d14a13b70076ddc6ee6ccad248e73dfd50eff8098c05afdb704f7f3be560
|
4
|
+
data.tar.gz: b4c0597894d8b9ebea7e37c4d6173038e4185b015714e933be5e63372a3576c8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 941b67d25a355a18af7c7fc14b009d56ebb4aa004282984c3db06f542d35b4cdbd36772a60d3be3ff4567e7fbcace7a8b04782b78765dd6f4270632e60634062
|
7
|
+
data.tar.gz: 531f9780f79c4fa0b27b99b939776cf1b499bb97f9fb3de74ed89f6b33d9cd61622e1765b10edc0f6c2f0897e6c80f784262ba2a4b16dd1042df3924ead8cbf6
|
data/README.md
CHANGED
@@ -71,9 +71,11 @@ Then drop in Chartkick into your `application.js` (or similar):
|
|
71
71
|
Need to pass `current_user`?
|
72
72
|
|
73
73
|
```erbruby
|
74
|
-
render_metric :users, user: current_user
|
74
|
+
render_metric :users, user: current_user, account: current_account
|
75
75
|
```
|
76
76
|
|
77
|
+
`user` and `account` will be `attr_reader`-ized.
|
78
|
+
|
77
79
|
### Value to calculate
|
78
80
|
|
79
81
|
In your metric, define columns:
|
data/lib/metricky/period.rb
CHANGED
@@ -23,8 +23,7 @@ module Metricky
|
|
23
23
|
deprecate_and_alias_method :period?, :trend?
|
24
24
|
|
25
25
|
def valid_period?
|
26
|
-
|
27
|
-
raise NameError, "period must be one of #{Groupdate::PERIODS}. It is #{period}."
|
26
|
+
Groupdate::PERIODS.include?(period.to_sym)
|
28
27
|
end
|
29
28
|
deprecate_and_alias_method :valid_period?, :valid_trend?
|
30
29
|
end
|
data/lib/metricky/version.rb
CHANGED