Skip to content
This repository was archived by the owner on Oct 19, 2018. It is now read-only.
This repository was archived by the owner on Oct 19, 2018. It is now read-only.

Calling a server-side method that performs a save always rolls back #2

@adamcreekroad

Description

@adamcreekroad

Any fetch performs a rollback when it's done, but there are cases where someone might want to save data when calling a method. For example:

def desk_case
  case_id = super
  if !case_id && (case_id = DeskInteraction.get_case_for_order(self).to_s)
    update_attribute(:desk_case, case_id)
  end
  case_id
end

This can be worked around in application specific code, but not sure if it should be something fixed/added to ReactiveRecord.

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