module IonicNotification
  module Concerns
    module IonicNotificable
      extend ActiveSupport::Concern

      included do
        serialize :device_tokens, Array

        def notify
          puts "Fire notification"
        end
      end
    end
  end
end

module IonicNotification
  module Concerns
    module IonicNotificable
      extend ActiveSupport::Concern

      included do
        serialize :device_tokens, Array

        def notify(options = {})
          notification = IonicNotification::Notification.new options
          notification.send
        end
      end
    end
  end
end

Send notifications from within the model
Send notifications from within the model
