Skip to content

Update fails #15

Description

@jufemaiz

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions