Skip to content
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

Undefined method 'push_relation' #65

Closed
wants to merge 3 commits into from

Conversation

tacticiankerala
Copy link

Failing spec for the issue [https://github.com//issues/62]

@DougPuchalski
Copy link
Contributor

@sxross Had you anticipated supporting nested attribute assignments in the array model adapter?

@sxross
Copy link
Owner

sxross commented Jun 28, 2013

It's a common request. I think it should be considered.

@sxross
Copy link
Owner

sxross commented Jun 28, 2013

@tacticiankerala is this the same as #62?

@tacticiankerala
Copy link
Author

Sorry for the confusion. It's the same as the #62.

I will change 'all' to 'to_a'.

I was under the impression that it is how the library's has_many relation
works. I guess it will be same with many people with rails background.
On 28 Jun 2013 21:34, "s.ross" [email protected] wrote:

@tacticiankerala https://github.com/tacticiankerala is this the same as
#62 #62?


Reply to this email directly or view it on GitHubhttps://github.com//pull/65#issuecomment-20197506
.

@DougPuchalski
Copy link
Contributor

accepts_nested_attributes_for is most certainly an additional feature on top of the associations themselves. Since Rails is so very form-based it makes tons of sense. For RubyMotion, it might be superfluous. I'm not against supporting it, but I do feel that by keeping MotionModel on the leaner side it will be easier to maintain.

@sxross
Copy link
Owner

sxross commented Jun 28, 2013

Consider the case where a bunch of data is being retrived from the server -- maybe a Rails server -- in JSON form, with nested attributes. Is that a compelling enough use case?

Agreed that this is a feature request.

@tacticiankerala
Copy link
Author

That is what exactly is am doing.

Also please note that 'push_relation' method is called with out being
defined anywhere. Am I missing something?
On 28 Jun 2013 23:23, "s.ross" [email protected] wrote:

Consider the case where a bunch of data is being retrived from the server
-- maybe a Rails server -- in JSON form, with nested attributes. Is that a
compelling enough use case?

Agreed that this is a feature request.


Reply to this email directly or view it on GitHubhttps://github.com//pull/65#issuecomment-20203705
.

@sxross
Copy link
Owner

sxross commented Jun 28, 2013

Yes, I will have to do a git bisect to figure out what's going on here. Not forgetting your issue.

@DougPuchalski
Copy link
Contributor

I was hoping for a spec that would exercise the method that calls it but
for existing functionality. I think it is a NOP.

We should open another issue to request the accepts nested attributes
feature.

On Jun 28, 2013, at 11:00 AM, Sreenath Nannat [email protected]
wrote:

That is what exactly is am doing.

Also please note that 'push_relation' method is called with out being
defined anywhere. Am I missing something?
On 28 Jun 2013 23:23, "s.ross" [email protected] wrote:

Consider the case where a bunch of data is being retrived from the server
-- maybe a Rails server -- in JSON form, with nested attributes. Is that
a
compelling enough use case?

Agreed that this is a feature request.


Reply to this email directly or view it on GitHub<
https://github.com/sxross/MotionModel/pull/65#issuecomment-20203705>
.


Reply to this email directly or view it on
GitHubhttps://github.com//pull/65#issuecomment-20204110
.

@tacticiankerala
Copy link
Author

I came across this particular issue while trying to do nested attribute
assignment.
It actually confused me that the feature exists but has some issue. Now I
understand that both are two different issues. Thanks for clarifying.
On 28 Jun 2013 23:42, "Doug Puchalski" [email protected] wrote:

I was hoping for a spec that would exercise the method that calls it but
for existing functionality. I think it is a NOP.

We should open another issue to request the accepts nested attributes
feature.

On Jun 28, 2013, at 11:00 AM, Sreenath Nannat [email protected]
wrote:

That is what exactly is am doing.

Also please note that 'push_relation' method is called with out being
defined anywhere. Am I missing something?
On 28 Jun 2013 23:23, "s.ross" [email protected] wrote:

Consider the case where a bunch of data is being retrived from the
server
-- maybe a Rails server -- in JSON form, with nested attributes. Is that
a
compelling enough use case?

Agreed that this is a feature request.


Reply to this email directly or view it on GitHub<
https://github.com/sxross/MotionModel/pull/65#issuecomment-20203705>
.


Reply to this email directly or view it on
GitHubhttps://github.com//pull/65#issuecomment-20204110

.


Reply to this email directly or view it on GitHubhttps://github.com//pull/65#issuecomment-20204786
.

…rted into proper array by cast_to_array"

This reverts commit de3dd8e.
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.

3 participants