Skip to content

PATCH update instead of full PUT request #169

@aliismayilov

Description

@aliismayilov

Here's an idea how activeresource could be better. At the moment, when you do

account = Account.find(1)
account.name = 'new name'
account.save

the last line fires a full PUT request which includes unchanged attributes of the account object.

As I see, activeresource gem already includes activemodel gem as dependency. We could maybe use of the ActiveModel::Dirty#changed functionality and send a PATCH request with only the fields which have changed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions