Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
*.gem
*.sqlite*
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,11 @@ module NotificationLib

after_commit :cache

serialize :metadata, Hash
if ActiveRecord.gem_version >= Gem::Version.new('7.0.0')
serialize :metadata, type: Hash, coder: YAML
else
serialize :metadata, Hash
end

belongs_to :target, polymorphic: true
belongs_to :object, polymorphic: true, optional: true
Expand Down
6 changes: 3 additions & 3 deletions notification-settings/Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
PATH
remote: .
specs:
notification-settings (3.0.3)
notification-settings (4.0.1)
activemodel (>= 5.0)
activerecord (>= 5.0)
activesupport (>= 5.0)
hashie (>= 3.6, < 6.0)
notification-handler (= 3.0.3)
notification-handler (= 4.0.1)
railties (>= 5.0)

GEM
Expand Down Expand Up @@ -138,7 +138,7 @@ GEM
nokogiri (1.16.7)
mini_portile2 (~> 2.8.2)
racc (~> 1.4)
notification-handler (3.0.3)
notification-handler (4.0.1)
activerecord (>= 5.0)
activesupport (>= 5.0)
railties (>= 5.0)
Expand Down
6 changes: 5 additions & 1 deletion notification-settings/lib/notification_settings/settings.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,11 @@ module Settings
included do
before_validation :build_settings

serialize :settings, Hashie::Mash
if ActiveRecord.gem_version >= Gem::Version.new('7.0.0')
serialize :settings, type: Hashie::Mash, coder: YAML
else
serialize :settings, Hashie::Mash
end

include NotificationSettings::Settings::InstanceMethods
end
Expand Down