cats_core 1.0.11 → 1.0.12

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: 32c70181bd52a346e553ef01325a87cb1c72ba19d831bc1b9ebe6e735b792a32
4
- data.tar.gz: 00f2b8a381e9d969547fe5a16338b8f02ad374f0dfe40db14b1074614877e6bf
3
+ metadata.gz: ad0f19c4e9e9d38a4038b2f94ca78ea18fb730dccb1c04bacf403a8fe5b29de5
4
+ data.tar.gz: 452ec1bb9126955274e5adae51d60a903e88674da97610b1b9945c43995d1ab6
5
5
  SHA512:
6
- metadata.gz: 5810cd3ad764b6e64d5ec9ba1a86591b0bd25d26051aea58da57ec8bb2fd768d62566aa08092d82a045b46c6af0327d57a40b2dc4062dae69456686135cb9e35
7
- data.tar.gz: d25a81609c51dbce17369920073f40295d88c93f91533199e795fc06362f690d36e3c754d5b86c3b2893fc7212b02334e9a02eea820d5565c8a5dc11b4ba317f
6
+ metadata.gz: 40dcc3d2d091d837d24da04a8889bca46b8afa22662c27fa518fb3ef9b98c2b20aad829f3f5126e444566e6229ca67d954dfa0ac7f76e93c4f03ef80c40fded4
7
+ data.tar.gz: ad35c7773f8b1ea0bf10193d70e0857096da4768029c4b1de675b1a9c005e0d6fba86f8201739fafde97122a137a2122bd4aa12b506b965a053a2606f963d418
@@ -11,7 +11,7 @@ module Cats
11
11
  private
12
12
 
13
13
  def set_role
14
- @role = Role.find(params[:id])
14
+ @role = Role.find_by(name: params[:name])
15
15
  end
16
16
  end
17
17
  end
@@ -6,7 +6,7 @@ module Cats
6
6
  belongs_to :recipient, polymorphic: true
7
7
 
8
8
  def message
9
- { id: id, read: !read_at.nil? }.merge(to_notification.message)
9
+ { id: id, read: !read_at.nil?, created_at: created_at }.merge(to_notification.message)
10
10
  end
11
11
 
12
12
  def self.messages(notifications)
data/config/routes.rb CHANGED
@@ -10,7 +10,7 @@ Cats::Core::Engine.routes.draw do
10
10
  post 'mark_as_unread', controller: :notifications, action: :mark_as_unread
11
11
  end
12
12
  end
13
- resources :roles do
13
+ resources :roles, param: :name do
14
14
  member do
15
15
  get 'users', controller: :roles, action: :users
16
16
  end
@@ -1,5 +1,5 @@
1
1
  module Cats
2
2
  module Core
3
- VERSION = '1.0.11'.freeze
3
+ VERSION = '1.0.12'.freeze
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cats_core
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.11
4
+ version: 1.0.12
5
5
  platform: ruby
6
6
  authors:
7
7
  - Henock L.