lib/intercom-rails/import.rb in intercom-rails-0.2.29 vs lib/intercom-rails/import.rb in intercom-rails-0.2.30
- old
+ new
@@ -114,14 +114,18 @@
def user_klass
if IntercomRails.config.user.model.present?
IntercomRails.config.user.model.call
else
- User
+ user_klass_name if user_klass_name.class != Module
end
rescue NameError
# Rails lazy loads constants, so this is how we check
nil
+ end
+
+ def user_klass_name
+ User
end
def send_users(users)
request = Net::HTTP::Post.new(uri.request_uri)
request.basic_auth(IntercomRails.config.app_id, IntercomRails.config.api_key)