markusschwed
2011-Feb-28 16:16 UTC
Feature: ActiveResource - Adding associations through reflections
Hello everyone, I''m new in contributing and i saw in the contributing-guides, that i have to write an email at this list. I hope, that''s the right place for this. If it''s not, i''M really sorry.. ;) Could someone please give me feedback about this lighthouse-ticket? https://rails.lighthouseapp.com/projects/8994/tickets/6473-activeresource-adding-associations-through-reflections It''s about adding association-definitions in ActiveResource. Thank you for reading this Mail. Greetings Markus Schwed -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to rubyonrails-core@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-core+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en.
Antonio Tapiador del Dujo
2011-Mar-01 08:23 UTC
Re: Feature: ActiveResource - Adding associations through reflections
Hi Markus, can associated records be created, using accepts_nested_attributes_for ? That would be awesome! El Lunes, 28 de Febrero de 2011 17:16:07 markusschwed escribió:> Hello everyone, > > I''m new in contributing and i saw in the contributing-guides, that i > have to write an email at this list. > I hope, that''s the right place for this. If it''s not, i''M really > sorry.. ;) > > Could someone please give me feedback about this lighthouse-ticket? > https://rails.lighthouseapp.com/projects/8994/tickets/6473-activeresource-a > dding-associations-through-reflections > > It''s about adding association-definitions in ActiveResource. > > Thank you for reading this Mail. > > Greetings > Markus Schwed-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to rubyonrails-core@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-core+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en.
markusschwed
2011-Mar-01 15:12 UTC
Re: Feature: ActiveResource - Adding associations through reflections
Hi Antonio, at the moment there is only the possibility to specify the class-name for an associated resource via :class_name - option. We added the association-definitions similar to the ActiveRecord-way with own Reflection-classes, because we want to add some cool features in the future. Indeed, your idea with accepts_nested_attributes_for for create and update is really good and could be on of these features to add. Please visit the ticket, apply the patch and give feedback, that would be very helpful. Greetings Markus On 1 Mrz., 09:23, Antonio Tapiador del Dujo <atapia...@dit.upm.es> wrote:> Hi Markus, > > can associated records be created, using accepts_nested_attributes_for ? > > That would be awesome! > > El Lunes, 28 de Febrero de 2011 17:16:07 markusschwed escribió: > > > Hello everyone, > > > I''m new in contributing and i saw in the contributing-guides, that i > > have to write an email at this list. > > I hope, that''s the right place for this. If it''s not, i''M really > > sorry.. ;) > > > Could someone please give me feedback about this lighthouse-ticket? > >https://rails.lighthouseapp.com/projects/8994/tickets/6473-activereso... > > dding-associations-through-reflections > > > It''s about adding association-definitions in ActiveResource. > > > Thank you for reading this Mail. > > > Greetings > > Markus Schwed > >-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to rubyonrails-core@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-core+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en.
mafolz
2011-Mar-08 07:54 UTC
Re: Feature: ActiveResource - Adding associations through reflections
Hi In fact, we would extend active resource with more restful features. At the moment, a class-definition with has_many, has_one gives you the posibility to have a resource with self associations. For example: an Comment can have other comment and so on. but for such a restful consume of a web service. a association over id''s isn''t precice enougth. we would build soon a resolver of link-tag in the data structure. for exampple, a post has many comments, the classical way to define a association is following: GET posts/1.xml <post> .. </post> GET posts/1/comments.xml <comments> <comment> <post-id>1</post-id> </comment> </comments> but you must have knowlege over the api server side. you must know the url where you found the comments. my prefered way for complexe api structures are link-tags like atom- syndication-format. GET posts/1.xm <post> <link type="comment" href="comments/1"> <post> you don''t need to know who the comments are, the posts gives his associated objects. every instance in restful apis should be selfdescribed. summary, we would make activeresource smarter for the way, its consume services and resolve associations and save performance. at first, we would focus on this. smarter client usage is point two for us masterplan :D On 1 Mrz., 09:23, Antonio Tapiador del Dujo <atapia...@dit.upm.es> wrote:> Hi Markus, > > can associated records be created, using accepts_nested_attributes_for ? > > That would be awesome! > > El Lunes, 28 de Febrero de 2011 17:16:07 markusschwed escribió: > > > Hello everyone, > > > I''m new in contributing and i saw in the contributing-guides, that i > > have to write an email at this list. > > I hope, that''s the right place for this. If it''s not, i''M really > > sorry.. ;) > > > Could someone please give me feedback about this lighthouse-ticket? > >https://rails.lighthouseapp.com/projects/8994/tickets/6473-activereso... > > dding-associations-through-reflections > > > It''s about adding association-definitions in ActiveResource. > > > Thank you for reading this Mail. > > > Greetings > > Markus Schwed > >-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to rubyonrails-core@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-core+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en.