ruby-trello icon indicating copy to clipboard operation
ruby-trello copied to clipboard

When refresh! is called on a class that inherits from BasicData, it's attributes are not refreshed

Open brycemcd opened this issue 9 years ago • 0 comments

As a developer, I expect refresh! to update the caller with the most recent data available from the Trello API. I discovered this not to be the case while working on #208 .

An example:

@card # => badges: {votes: 0}
# some other user acting on the same card:
@card.upvote # => badges: {votes: 1}
# back to me
@card.refresh! # => badges: {votes: 0}, should be votes: 1 

It seems that the client calls #get and fetches the new data, but the object is not updated with the most recent data.

brycemcd avatar Aug 19 '16 03:08 brycemcd