Преглед изворни кода

Make messages include call_logs in json

Lily Carpenter пре 10 година
родитељ
комит
46e7de57b2
1 измењених фајлова са 4 додато и 0 уклоњено
  1. 4 0
      twilio/app/models/message.rb

+ 4 - 0
twilio/app/models/message.rb

@@ -4,4 +4,8 @@ class Message < ActiveRecord::Base
4 4
   validates :secret, presence: true, uniqueness: true
5 5
 
6 6
   has_many :call_logs
7
+
8
+  def as_json(options = {})
9
+    super(include: :call_logs)
10
+  end
7 11
 end