Closed mtaylor closed 11 years ago
Martyn could you update the description with the examples? They seem to have not gone through in the formatting. If you are having trouble, you can just put them in a block with 3 single quotes, line break, and close again with 3 more quotes.
Ok, overall this looks pretty reasonable. Once you have looked through and responded to or addressed my comments, could you update either the commit or the issue to reference this pull request (either is fine by me).
Rails uses foreign key in the database in order to associate resources. For example, in order to associate an existing template with a new BaseImage the format would be as follows:
This goes against the resource principal as outlined here: http://www.ics.uci.edu/~fielding/pubs/dissertation/rest_arch_style.htm @ 5.2.1.1 Resources and Resource Identifiers
Instead we want to use proper resource representations of the template. i.e.:
To do this I have taken the Filter created by jstransk which can be found here: https://github.com/aeolusproject/conductor/blob/d8c70dd9b90f87ea8bce364dca85fdb8e08e0de4/src/app/util/resource_link_filter.rb
I have not included tests for the filter since they are included in jstransk patchset. Eventually we want to pull out the rails API filters into a gem and share them across projects.
You can test this manually using the example added to the README