exotel_api 0.5.1 → 0.5.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 4cd9032584002a065e8875e00362bd88717a81fb
4
- data.tar.gz: 1dfbb9cdc4766ea346aa792bf2196b9426c810f4
3
+ metadata.gz: 14c3353104a2c1d26f4163039fea105acefe7315
4
+ data.tar.gz: 55700fe7f1ed4325d6b1500d6f632819fa36c36d
5
5
  SHA512:
6
- metadata.gz: ab95301818d01ee0ed2ce99113ccb591d5c39bb1326306234644087ab6bc0368fc61569cddc38eac2db53279f45ce4cd4416221e5ea145232b124dd3239a1db9
7
- data.tar.gz: 1b518905b133c183a984f24deaeddcf7ca3571984417b8dbaed3fb3ba8e0360b03b0d8cda78fa70ba7b00759897e976bfc48bd55e176ba1f3bc116ecc8aed85b
6
+ metadata.gz: 2bf7e817fc9e3f1cff215f64c86a1fc6b1ec9acfb83a8d7876e789db3b782d5ac76121db149e7a8af02fddb37502ea5d077b53c3f0d7d50c18fbdf990c5dbf22
7
+ data.tar.gz: ac8bbd86bbf2ceaf134748a6a2e391111148852e6e50a4ec470a76c7571aa42b46c09fcd4d9559d1942adccd5b4f0d6f39da95dbf35b4f4184ecbdb899f3a583
@@ -10,7 +10,13 @@ module ExotelApi
10
10
  private
11
11
  def find_call
12
12
  if params[:CustomField].present?
13
- params[:CustomField].titleize.split.join.constantize::Call.find_by_call_sid(params[:CallSid])
13
+ custom_field = params[:CustomField]
14
+ if request[:controller].present?
15
+ controller_name = request[:controller]
16
+ controller_name = controller_name.gsub("/exotel_api",custom_field)
17
+ controller_name = controller_name.split('/').compact.map {|k| k.titleize.split.join }.join('::')
18
+ controller_name.constantize.find_by_call_sid(params[:CallSid])
19
+ end
14
20
  else
15
21
  eval(ExotelApi.status_callback_query)
16
22
  end
@@ -1,3 +1,3 @@
1
1
  module ExotelApi
2
- VERSION = "0.5.1"
2
+ VERSION = "0.5.2"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: exotel_api
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.1
4
+ version: 0.5.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Aashutosh Chaudhary
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-09-23 00:00:00.000000000 Z
11
+ date: 2017-09-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler