lib/inboxable/configuration.rb in inboxable-0.1.0 vs lib/inboxable/configuration.rb in inboxable-0.1.1
- old
+ new
@@ -1,10 +1,10 @@
module Inboxable
class Configuration
ALLOWED_ORMS = %i[activerecord mongoid].freeze
- attr_accessor :orm
+ attr_accessor :orm, :inbox_model
def initialize
raise Error, 'Sidekiq is not available. Unfortunately, sidekiq must be available for Inboxable to work' unless Object.const_defined?('Sidekiq')
raise Error, 'Inboxable Gem uses the sidekiq-cron Gem. Make sure you add it to your project' unless Object.const_defined?('Sidekiq::Cron')
raise Error, 'Inboxable Gem only supports Rails but you application does not seem to be a Rails app' unless Object.const_defined?('Rails')
@@ -20,8 +20,12 @@
@orm = orm
end
def orm
@orm || :activerecord
+ end
+
+ def inbox_model
+ @inbox_model || 'Inbox'
end
end
end