Class: NotifyUser::NotificationSerializer

Inherits:
ActiveModel::Serializer
  • Object
show all
Defined in:
app/serializers/notify_user/notification_serializer.rb

Instance Method Summary collapse

Instance Method Details

#messageObject



6
7
8
9
10
# File 'app/serializers/notify_user/notification_serializer.rb', line 6

def message
  options[:template_renderer].render_to_string(:template => object.class.views[:mobile_sdk][:template_path].call(object),
                                               :locals => {params: object.params},
                                               :layout => false, :formats => [:html])
end

#readObject



12
13
14
# File 'app/serializers/notify_user/notification_serializer.rb', line 12

def read
  object.read?
end