Re: [Radiant] Abstract and Resource controllers
On Thu, Jan 29, 2009 at 2:36 PM, Andrew Neil wrote: > I'm pleased that you have a working link_roll extension, at the end of it. > That was my main concern. If you could update the errors you've pointed out > too, that would be a great help. I've updated the wiki with some of the items I found. I have not updated the screenshots though (I don't have a mac, so we would get windows / linux screenshots instead). > It's hard to keep a consistent tone of voice on a wiki. Please feel free to > edit the style of prose however you see fit. I know, for now I left it as-is until I can figure out how to let it sound better. > I think that when the default (commented out) routes are generated, it is > not possible to know how the controllers in your extension will be named. > All that is known is the name of the extension itself. It could be useful, > though, to make the default route resourceful, as a pointer for extension > developers. Sean already merged http://github.com/radiant/radiant/commit/efcee1767370ae84e0713a70113614ffac882227 so that should put developers in the right direction. > Another point about the generated output, is that the "deactivate" action > could probably be left out, now that it does nothing (I think). I don't know about it's history (and future), so I can't comment on that, but it's easily removed from the template if needed. Jeroen ___ Radiant mailing list Post: Radiant@radiantcms.org Search: http://radiantcms.org/mailing-list/search/ Site: http://lists.radiantcms.org/mailman/listinfo/radiant
Re: [Radiant] Abstract and Resource controllers
Thanks Jeroen, for taking the time to do this. I'm pleased that you have a working link_roll extension, at the end of it. That was my main concern. If you could update the errors you've pointed out too, that would be a great help. the first thing I've noticed is > that the text uses "I" and "my" in several places in the first > paragraph. I think it is written from the 'radiant author' > perspective? Maybe a couple of "we" instead of "I" will make it a > little 'easier' to read (but opinions may differ). It's hard to keep a consistent tone of voice on a wiki. Please feel free to edit the style of prose however you see fit. What I can see from the "generated" output is that so far only the > 'route' section is out of date (in the generator). I'll make a small > patch to the generator template to use the rest routing by default > (commented out ofcourse). I think that when the default (commented out) routes are generated, it is not possible to know how the controllers in your extension will be named. All that is known is the name of the extension itself. It could be useful, though, to make the default route resourceful, as a pointer for extension developers. Another point about the generated output, is that the "deactivate" action could probably be left out, now that it does nothing (I think). Cheers, Drew > > > Jeroen > ___ > Radiant mailing list > Post: Radiant@radiantcms.org > Search: http://radiantcms.org/mailing-list/search/ > Site: http://lists.radiantcms.org/mailman/listinfo/radiant > ___ Radiant mailing list Post: Radiant@radiantcms.org Search: http://radiantcms.org/mailing-list/search/ Site: http://lists.radiantcms.org/mailman/listinfo/radiant
Re: [Radiant] Abstract and Resource controllers
On Thu, Jan 29, 2009 at 1:13 AM, Andrew Neil wrote: > I would appreciate if anyone can take the time to step through the latest > version of the tutorial, using Radiant 0.7 (edge, not rc2), and let me know > if everything works as it should. I'm rereading the tutorial atm, and the first thing I've noticed is that the text uses "I" and "my" in several places in the first paragraph. I think it is written from the 'radiant author' perspective? Maybe a couple of "we" instead of "I" will make it a little 'easier' to read (but opinions may differ). The first screenshot showing the "Extensions" link does not match the 'current' one (the Archive extension is present by default aswell). And as a result the text below (about the two default extensions isn't correct anymore). When generating a new model, the migration file is generated based upon the UTC date/time (this is new in rails 2.1). I don't know if we want to mention that, but as a result the migration file will not be called "001*". The erb files at the end of part1: * Edit view is for link_roll/app/views/admin/links/edit.html.erb (edit instead of new) * Form view (partial) is missing filename (should be link_roll/app/views/admin/links/_form.html.erb ) Apart from these small items, everything looks ok and I got a working link roll extension at the end of the walkthrough. What I can see from the "generated" output is that so far only the 'route' section is out of date (in the generator). I'll make a small patch to the generator template to use the rest routing by default (commented out ofcourse). Jeroen ___ Radiant mailing list Post: Radiant@radiantcms.org Search: http://radiantcms.org/mailing-list/search/ Site: http://lists.radiantcms.org/mailman/listinfo/radiant
Re: [Radiant] Abstract and Resource controllers
On 27 Jan 2009, at 22:15, Andrew Neil wrote: I am planning on updating the Creating Radiant Extensions tutorial[1] to reflect these changes. I hesitate, because I think the current tutorial should continue to exist, as long as Radiant 0.6.9 and below are still in usage. Would it be acceptable to place a paragraph at the top of the tutorial, linking to a previous revision? e.g.: http://wiki.radiantcms.org/Creating_Radiant_Extensions/38 An alternative would be to create a new page for the tutorial. My preference would be to update the current article for 0.7, then create a new page called "Creating Radiant Extensions (pre-0.7)", and copy the current state of the tutorial into that one. The existing tutorial has quite a lot of links pointing at it, and I think it would be better to keep the article at that URL the most current. I've gone ahead and 'forked' the wiki pages. The original tutorial now exists here: A: http://wiki.radiantcms.org/Creating_Radiant_Extensions_A_0-6 B: http://wiki.radiantcms.org/Creating_Radiant_Extensions_B_0-6 And the updated for 0.7 version lives on at the original URLs: A: http://wiki.radiantcms.org/Creating_Radiant_Extensions B: http://wiki.radiantcms.org/Creating_Radiant_Extensions_B I would appreciate if anyone can take the time to step through the latest version of the tutorial, using Radiant 0.7 (edge, not rc2), and let me know if everything works as it should. Cheers, Drew p.s. On another note, I was developing this with 0.7.0-rc2 to begin with, but was hindered by a bug which Sean has now fixed[2]. I switched to edge, and was able to continue. ___ Radiant mailing list Post: Radiant@radiantcms.org Search: http://radiantcms.org/mailing-list/search/ Site: http://lists.radiantcms.org/mailman/listinfo/radiant
Re: [Radiant] Abstract and Resource controllers
On Tue, Jan 27, 2009 at 11:15 PM, Andrew Neil wrote: > I've forked the link_roll extension, and made it play with Radiant 0.7.0. Fantastic! > An alternative would be to create a new page for the tutorial. My preference > would be to update the current article for 0.7, then create a new page > called "Creating Radiant Extensions (pre-0.7)", and copy the current state > of the tutorial into that one. The existing tutorial has quite a lot of > links pointing at it, and I think it would be better to keep the article at > that URL the most current. > > Any thoughts on the issue? I think it would be good to have a "0.7" section on the wiki, so people can actually see what (documentation) has been updated and checked to be working with 0.7. Else they might start using 'pre-0.7' documentation and finding all sorts of things not working (and that might be confusing). Maybe also a 'migration guide' / 'howto' on what you need to change in your pre 0.7 extension to get it working with 0.7 would be cool (since you figured out how to do that now ;) On a side note, I'll have a try and update the radiant/lib/generators/extension* code to match the 0.7 behaviour (i.e. use admin.resources in the define_resources section of generate extension, etc). Jeroen Janssen ___ Radiant mailing list Post: Radiant@radiantcms.org Search: http://radiantcms.org/mailing-list/search/ Site: http://lists.radiantcms.org/mailman/listinfo/radiant
Re: [Radiant] Abstract and Resource controllers
Awesome work, Andrew! Sean Andrew Neil wrote: I've forked the link_roll extension, and made it play with Radiant 0.7.0. Here it is: http://github.com/nelstrom/radiant-link-roll-extension/tree/master It now uses the Admin::ResorceController, instead of the Admin::AbstractModelController, and generates Rails default restful routes. I am planning on updating the Creating Radiant Extensions tutorial[1] to reflect these changes. I hesitate, because I think the current tutorial should continue to exist, as long as Radiant 0.6.9 and below are still in usage. Would it be acceptable to place a paragraph at the top of the tutorial, linking to a previous revision? e.g.: http://wiki.radiantcms.org/Creating_Radiant_Extensions/38 An alternative would be to create a new page for the tutorial. My preference would be to update the current article for 0.7, then create a new page called "Creating Radiant Extensions (pre-0.7)", and copy the current state of the tutorial into that one. The existing tutorial has quite a lot of links pointing at it, and I think it would be better to keep the article at that URL the most current. Any thoughts on the issue? Cheers, Drew p.s. On another note, I was developing this with 0.7.0-rc2 to begin with, but was hindered by a bug which Sean has now fixed[2]. I switched to edge, and was able to continue. [1]: http://wiki.radiantcms.org/Creating_Radiant_Extensions [2]: http://github.com/radiant/radiant/commit/9c8e24b434e9ca616b0e58c47deaf42a828fbed1#L2R178 On 25 Oct 2008, at 15:39, Andrew Neil wrote: Hi folks, I recently updated the Creating Radiant Extensions tutorial[1], by removing the references to Scaffolding (dead since Rails 2). Instead of using scaffolding, I suggested making the LinksController inherit from the AbstractModelController: class Admin::LinksController < Admin::AbstractModelController model_class Link end I'm watching the Radiant sprint weekend from afar, and noticed that there is now an Admin::ResourceController[2]. Is this going to replace the AbstractModelController? I'm happy to update the tutorial to reflect this. Presumably the routes will be updated to follow the rails convention for RESTful routes. I'll wait until the work from the sprint weekend has been consolidated into a release before I update the tutorial. Cheers, Drew [1]: http://wiki.radiantcms.org/Creating_Radiant_Extensions [2]: http://github.com/radiant/radiant/tree/8a8b7d6812323738033e1f33b536195c24f6cab1/app/controllers/admin/resource_controller.rb ___ Radiant mailing list Post: Radiant@radiantcms.org Search: http://radiantcms.org/mailing-list/search/ Site: http://lists.radiantcms.org/mailman/listinfo/radiant ___ Radiant mailing list Post: Radiant@radiantcms.org Search: http://radiantcms.org/mailing-list/search/ Site: http://lists.radiantcms.org/mailman/listinfo/radiant ___ Radiant mailing list Post: Radiant@radiantcms.org Search: http://radiantcms.org/mailing-list/search/ Site: http://lists.radiantcms.org/mailman/listinfo/radiant
Re: [Radiant] Abstract and Resource controllers
I've forked the link_roll extension, and made it play with Radiant 0.7.0. Here it is: http://github.com/nelstrom/radiant-link-roll-extension/tree/master It now uses the Admin::ResorceController, instead of the Admin::AbstractModelController, and generates Rails default restful routes. I am planning on updating the Creating Radiant Extensions tutorial[1] to reflect these changes. I hesitate, because I think the current tutorial should continue to exist, as long as Radiant 0.6.9 and below are still in usage. Would it be acceptable to place a paragraph at the top of the tutorial, linking to a previous revision? e.g.: http://wiki.radiantcms.org/Creating_Radiant_Extensions/38 An alternative would be to create a new page for the tutorial. My preference would be to update the current article for 0.7, then create a new page called "Creating Radiant Extensions (pre-0.7)", and copy the current state of the tutorial into that one. The existing tutorial has quite a lot of links pointing at it, and I think it would be better to keep the article at that URL the most current. Any thoughts on the issue? Cheers, Drew p.s. On another note, I was developing this with 0.7.0-rc2 to begin with, but was hindered by a bug which Sean has now fixed[2]. I switched to edge, and was able to continue. [1]: http://wiki.radiantcms.org/Creating_Radiant_Extensions [2]: http://github.com/radiant/radiant/commit/9c8e24b434e9ca616b0e58c47deaf42a828fbed1#L2R178 On 25 Oct 2008, at 15:39, Andrew Neil wrote: Hi folks, I recently updated the Creating Radiant Extensions tutorial[1], by removing the references to Scaffolding (dead since Rails 2). Instead of using scaffolding, I suggested making the LinksController inherit from the AbstractModelController: class Admin::LinksController < Admin::AbstractModelController model_class Link end I'm watching the Radiant sprint weekend from afar, and noticed that there is now an Admin::ResourceController[2]. Is this going to replace the AbstractModelController? I'm happy to update the tutorial to reflect this. Presumably the routes will be updated to follow the rails convention for RESTful routes. I'll wait until the work from the sprint weekend has been consolidated into a release before I update the tutorial. Cheers, Drew [1]: http://wiki.radiantcms.org/Creating_Radiant_Extensions [2]: http://github.com/radiant/radiant/tree/8a8b7d6812323738033e1f33b536195c24f6cab1/app/controllers/admin/resource_controller.rb ___ Radiant mailing list Post: Radiant@radiantcms.org Search: http://radiantcms.org/mailing-list/search/ Site: http://lists.radiantcms.org/mailman/listinfo/radiant ___ Radiant mailing list Post: Radiant@radiantcms.org Search: http://radiantcms.org/mailing-list/search/ Site: http://lists.radiantcms.org/mailman/listinfo/radiant
[Radiant] Abstract and Resource controllers
Hi folks, I recently updated the Creating Radiant Extensions tutorial[1], by removing the references to Scaffolding (dead since Rails 2). Instead of using scaffolding, I suggested making the LinksController inherit from the AbstractModelController: class Admin::LinksController < Admin::AbstractModelController model_class Link end I'm watching the Radiant sprint weekend from afar, and noticed that there is now an Admin::ResourceController[2]. Is this going to replace the AbstractModelController? I'm happy to update the tutorial to reflect this. Presumably the routes will be updated to follow the rails convention for RESTful routes. I'll wait until the work from the sprint weekend has been consolidated into a release before I update the tutorial. Cheers, Drew [1]: http://wiki.radiantcms.org/Creating_Radiant_Extensions [2]: http://github.com/radiant/radiant/tree/8a8b7d6812323738033e1f33b536195c24f6cab1/app/controllers/admin/resource_controller.rb ___ Radiant mailing list Post: Radiant@radiantcms.org Search: http://radiantcms.org/mailing-list/search/ Site: http://lists.radiantcms.org/mailman/listinfo/radiant