amalc / rubyzoho

Abstracting Zoho’s API into a set of Ruby classes, with reflection of Zoho’s fields using a more familiar ActiveRecord lifecycle, but without ActiveRecord. Works with Rails and Devise.
MIT License
62 stars 57 forks source link

Find by related id doesn't work #68

Closed AlbaHoo closed 7 years ago

AlbaHoo commented 7 years ago

RubyZoho::Crm::Contact.find_by_accountid works RubyZoho::Crm::Deal.find_by_accountid does not work;

NoMethodError: undefined method `index' for nil:NilClass
    from /Users/Alba/.gem/ruby/2.2.2/gems/rubyzoho-0.5.0/lib/zoho_api.rb:232:in `valid_related?'
    from /Users/Alba/.gem/ruby/2.2.2/gems/rubyzoho-0.5.0/lib/zoho_api_finders.rb:35:in `find_record_by_related_id'
    from /Users/Alba/.gem/ruby/2.2.2/gems/rubyzoho-0.5.0/lib/zoho_api_finders.rb:7:in `find_records'
    from /Users/Alba/.gem/ruby/2.2.2/gems/rubyzoho-0.5.0/lib/crm.rb:45:in `run_find_by_method'
    from /Users/Alba/.gem/ruby/2.2.2/gems/rubyzoho-0.5.0/lib/crm.rb:27:in `method_missing'
    from (irb):11
AlbaHoo commented 7 years ago

Sorry I just saw the documentation, not possible!