GeneralScripting / pipedrive-ruby

31 stars 148 forks source link

Update fails #15

Open jufemaiz opened 10 years ago

jufemaiz commented 10 years ago

Update fails as requires symbolize_keys from rails extensions to hash ( http://apidock.com/rails/Hash/symbolize_keys ).

Should instead manually map key strings to key symbols.

    def update(opts = {})
      res = put "#{resource_path}/#{id}", :body => opts
      if res.success?
        res['data'] = Hash[res['data'].map {|k, v| [k.to_sym, v] }]
        @table.merge!(res['data'])
      else
        false
      end
    end
alexmamonchik commented 8 years ago

Hi Joel. I'm going to use this repo in my project but it looks like You don't support gem anymore. Maybe I can help with that if you give me access.

jufemaiz commented 8 years ago

Hey there @alexmamonchik , happy to hand over but I've not go ownership :(