Initial release of acts_as_resource
Written by Piers Cawley on , updated
Right. I’ve bundled acts_as_resource up and stuck it on the typosphere SVN server. You can grab it from http://svn.typosphere.org/typo/plugins/acts_as_resource if you’re interested. It’s currently in what I’d call an all convention, no configuration state - if your resources don’t look pretty similar to the kind of things you get from the resource scaffolding, you’ll probably have some pain, but I expect to rectify that with coming releases. One thing I want/need to do for instance is to allow for ‘relative’ ids in your resource url.
Right. I’ve bundled acts_as_resource
up and stuck it on the typosphere SVN server. You can grab it from http://svn.typosphere.org/typo/plugins/acts_as_resource if you’re interested.
It’s currently in what I’d call an all convention, no configuration state - if your resources don’t look pretty similar to the kind of things you get from the resource scaffolding, you’ll probably have some pain, but I expect to rectify that with coming releases. One thing I want/need to do for instance is to allow for ‘relative’ ids in your resource url. For instance, if you’re looking at /albums/10/tracks/982
, it’s not the most readable of permalinks… next trick is to allow you to have urls like /albums/because-its-there/tracks/1
, ie: the first track on the album ‘Because it’s There’. I’m sort of expecting that you’d do that by doing:
class Album has_many :tracks acts_as_resource :uri_field => :name_dasherized end
class Track belongs_to :album acts_as_list acts_as_resource :uri_field => :position, :parent => :album end
However, my first priority is to add some tests (or, more likely,Rspec specifications) so I’ve got some confidence that I’m not breaking things as I go.
Anyhow, go grab the plugin, have a play, let me know what you think.