Hi all, I'm writing an extension to Radiant that defines new database entities. The docs suggest to let my controller inherit from Admin::ResourceController, to "get a lot of functionality for free". What is that functionality, specifically?
In particular, I've been confused by that :singular and :plural stuff in there, what's that? When do I need that? What's going on with the @template_name and @controller_name variables, what do I need them for? As I've mentioned before, Radiant itself is pretty neat, but documentation on these parts of its public API isn't only lacking but non-existant. That makes it harder to understand errors like this: My entity is called "City", I've copied all relevant code from Radiants Page view and controller. The edit haml throws this error: undefined method `cities' for #<Radiant::AdminUI:0x102036be8> Extracted source (around line #1): 1: - render_region :main do |main| 2: - main.edit_header do 3: %h1 Edit City 4: - main.edit_form do /opt/local/lib/ruby/gems/1.8/gems/radiant-0.8.1/app/helpers/admin/regions_helper.rb:25:in `send' /opt/local/lib/ruby/gems/1.8/gems/radiant-0.8.1/app/helpers/admin/regions_helper.rb:25:in `lazy_initialize_region_set' /opt/local/lib/ruby/gems/1.8/gems/radiant-0.8.1/app/helpers/admin/regions_helper.rb:3:in `render_region' /Users/christian/mueller/vendor/extensions/mueller/app/views/admin/cities/edit.html.haml:1:in `_run_haml_vendor47extensions47mueller47app47views47admin47cities47edit46html46haml' It feels like I've got something wrong while copying code, but I can't easily tell what. Can you? Kind regards, Christian _______________________________________________ Radiant mailing list Post: [email protected] Search: http://radiantcms.org/mailing-list/search/ List Site: http://lists.radiantcms.org/mailman/listinfo/radiant Radiant: http://radiantcms.org Extensions: http://ext.radiantcms.org
