-
Notifications
You must be signed in to change notification settings - Fork 323
Include has_one attributes correctly when calling to_params #262
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
…arams Include has_one attributes correctly when calling to_params
|
Great job. Would you mind merge this code into your own fork? I would like to point to your fork/master. |
|
👍 |
|
@remiprev Besides this now causing conflicts, what was the reason this was never merged? This is causing pain for us and I'd really like to see this on |
|
@dturnerTS Ah, didn't see that and didn't realise that @remiprev was looking for a new maintainer. Thanks for the heads-up! |
|
@dturnerTS i'm working to get Her down to 0 PRs. given there is already has_many serialization, i think it makes sense to do the same for has_one associations. few things before we merge:
|
…s_in_to_params * upstream/master: (54 commits) Provide a more ActiveRecord-like interface by aliasing new_record? to new? Do not check if the record is persisted to get the default value. Add a failing test for a belongs_to association with nil foreign key in a non-persisted record. Fix belongs_to fetch Fix find through an association Fix parsing associations (Parse#extract_array) Add specs for testing associations with active_model_serializers use `request_path` in specs instead of internal `build_request_path` Fixes remi#357 specify the code block as ruby Escape path variables Parse has_one association data before initializing objects acquire a mutex when defining attribute methods use ActiveModel convention for defining attribute methods define all attribute methods inside generated_attribute_methods add specs for when attribute methods predefined make possible to spawn_model from superclass Update release notes for info on security fix Bump version to 0.7.6 Loosen activemodel, activesupport dependencies to < 4.3 to accommodate rails security fixes ...
…t the case where associations[:has_one] or associations[:has_many] is nil
|
@hubert Thanks for looking into this again. |
|
@dturnerTS thanks for taking the time to go through this again. can you rebase this instead of merging it? |
|
I'm not a big fan or rebasing. Can you explain why you think its preferable to the master merge here? |
Follow on to remiprev#206 to add support for has_one in to_params.
Also fixes remiprev#258