Skip to content

Conversation

jkeen
Copy link
Collaborator

@jkeen jkeen commented Feb 27, 2024

I made these updates long ago and have been using them on a private branch. There might still be edge cases I'm not considering, so I'm starting this PR as a place to consider it.

Changes:

# (for creates):
  @resource = MyResource.build(params);
  @resource.data #=> unsaved model with attributes applied


# (for updates):
  @resource = MyResource.find(params);
  @resource.assign_attributes
  @resource.data #=> unsaved model with attributes applied

@jkeen jkeen force-pushed the feature/data-access branch from fec4590 to 2882008 Compare February 28, 2024 15:34
@jkeen jkeen force-pushed the feature/data-access branch 3 times, most recently from 5d66f76 to bbacf6f Compare March 28, 2024 02:09
@jkeen jkeen force-pushed the feature/data-access branch from bbacf6f to 26a3820 Compare September 22, 2024 19:03
…closer mirroring rails controller patterns.

Changes:
 - (for creates):
	@resource = MyResource.build(params);
	@resource.data #=> unsaved model with attributes applied
 - (for updates):
	@resource = MyResource.find(params);
	@resource.assign_attributes
	@resource.data #=> unsaved model with attributes applied
@jkeen jkeen force-pushed the feature/data-access branch from 26a3820 to 8997e49 Compare September 22, 2024 19:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant