Convert model objects into request parameters with a overrideable helper method #21

Closed
wants to merge 1 commit into
from

Projects

None yet

3 participants

@thomsbg
thomsbg commented Aug 9, 2012

In order to implement some custom behavior for interacting with my API, I needed a hook to modify the request parameters sent when creating / updating my model.

In my case, I wanted to convert instances of a 'sub-model' to Rails' nested attribute parameter convention by changing params[:child_models] into params[:child_models_attributes]

@travisbot

This pull request passes (merged f4aca27 into 98eacd6).

@remiprev
Owner

This is a useful method, thanks for adding it. I merged it in e8542c9.

@remiprev remiprev closed this Aug 16, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment