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



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

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

#readObject



14
15
16
# File 'app/serializers/notify_user/notification_serializer.rb', line 14

def read
  object.read?
end