Method: Notifly::Models::Flyable#_create_notification_for

Defined in:
lib/notifly/models/flyable.rb

#_create_notification_for(fly) ⇒ Object



92
93
94
95
96
97
98
99
100
101
102
# File 'lib/notifly/models/flyable.rb', line 92

def _create_notification_for(fly)
  new_fly = _default_fly.merge(fly)

  notification = Notifly::Notification.create _get_attributes_from(new_fly)
  _after_create_notification(notification, new_fly)

rescue => e
  logger.error "Something goes wrong with Notifly, will ignore: #{e}"
  raise e if not Rails.env.production?

end