tramway-user 2.1.0.2 → 2.1.1

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
  SHA256:
3
- metadata.gz: f9a7481abc738893cb2e3e60e3c720fd5b5ab1041001b23c3ed347088ade0e12
4
- data.tar.gz: aa3c1c4d06c814b44513fb643f765becc6e2739a7fa5da5945ad1cecbaeb5429
3
+ metadata.gz: 037bd8cc7315589e051981edc5d56f47c3861a0b1de688f75972bbb22f360e58
4
+ data.tar.gz: 750a4df65ca848a95206769a917aa0e99033de1bdeaba0807ee6b13fc8dd37eb
5
5
  SHA512:
6
- metadata.gz: b4ceb12cfc1ea0efd97522608c6b67fb60b18f6d6ac190506b48e99c8c979be7420eeed904a43c5b6effc1a48476ed1b4f1b5f1bbae8f6b89c7f781fb09f3285
7
- data.tar.gz: 23cd4408a43bfbe02d370dadbb0ab09aea5f27d23983f208fecfbdae3cd2f5dbf8fb534144eed6bb7b0d53b97e754b02aa47641b9719cc4ddd5bb8d8ea9901ea
6
+ metadata.gz: 99dbc5c95d5bd7669a20c1845b1bf1f44dafcb3b0f00b143dfdfa83d5e1b4c601f3c4890c49963882d436ca7a4102d324b6041100e82e3978b39d3683773b4f6
7
+ data.tar.gz: 0a441f4d740be4e032eeb9b3c7bc4e5c10fe48924e9d310d7128d4255fd904137839a366328aff8c953300e2874a8c1b9ce0dca213d059f405ec19f76f40ca1f
data/README.md CHANGED
@@ -22,6 +22,10 @@ Or install it yourself as:
22
22
  $ gem install tramway-user
23
23
  ```
24
24
 
25
+ ## Methods
26
+
27
+ `Tramway::User::User` has scope `admins` which returns all admins from the app.
28
+
25
29
  ## Contributing
26
30
  Contribution directions go here.
27
31
 
@@ -9,8 +9,19 @@ class Tramway::User::UserDecorator < ::Tramway::Core::ApplicationDecorator
9
9
  def list_attributes
10
10
  [:email]
11
11
  end
12
+
13
+ def show_attributes
14
+ [:email, :first_name, :last_name, :role, :created_at, :updated_at]
15
+ end
12
16
  end
13
17
 
18
+ delegate :first_name, to: :object
19
+ delegate :last_name, to: :object
20
+ delegate :email, to: :object
21
+ delegate :role, to: :object
22
+ delegate :created_at, to: :object
23
+ delegate :updated_at, to: :object
24
+
14
25
  def name
15
26
  "#{object.first_name} #{object.last_name}"
16
27
  end
@@ -2,12 +2,6 @@ ru:
2
2
  activerecord:
3
3
  models:
4
4
  tramway/user/user: Пользователь
5
- attributes:
6
- tramway/user/user:
7
- password: Пароль
8
- first_name: Имя
9
- last_name: Фамилия
10
- role: Роль
11
5
  errors:
12
6
  models:
13
7
  tramway/user/user:
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Tramway
4
4
  module User
5
- VERSION = '2.1.0.2'
5
+ VERSION = '2.1.1'
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tramway-user
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.0.2
4
+ version: 2.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Pavel Kalashnikov
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-01-20 00:00:00.000000000 Z
11
+ date: 2020-02-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bcrypt