no-reply/ActiveTriples — pull request #59 by elrayle (2014-10-11 00:37:56+00:00)
Title: Add prefix_id to config

It is desired that all instances of a resource model have their IDs prefixed by the same set of characters. For example, a virtual collection model will always be prefixed by 'vc'. Creating an instance of the virtual collection model and passing in an id='123' will produce a full id='vc123'. This works in conjunction with base_uri to construct the full rdf_subject.

```
class DummyResourceWithPrefix < ActiveTriples::Resource
configure :base_uri => 'http://example.org', :prefix_id => 'b'
end
d = DummyResourceWithPrefix.new('1')
d.rdf_subject.to_s
# http://example.org/b1
```

NOTES:
* For backward compatibility, a prefix will not be added to the full generated rdf_subject, if no prefix_id is specified.
* When base_uri is not used to construct the rdf_subject, the prefix_id will not be used.