FYI, further testing shows it isn't because I'm overriding the column values in the WinesHelper.
Maybe it still is because the default action is edit though... I still haven't been able to figure out a cleaner way over overriding the method generated for joined tables. It sorta makes sense, although I would of expected the table to be generated normally and only getting a forbidden error via lockdown when trying to click the edit action link. Maybe I should be using a template override to do this? seems a bit "heavy" and non-DRY. Thanks, Aaron On Tue, Nov 10, 2009 at 9:38 AM, Aaron Turner <[email protected]> wrote: > On Tue, Nov 10, 2009 at 1:17 AM, Sergio Cambra .:: entreCables S.L. > ::. <[email protected]> wrote: >> >> I don't know Lockdown, you can try to debug using a debugger. Add a debugger >> line in vendor/plugins/active_scaffold/lib/active_scaffold/actions/list.rb, >> after do_list call in list method (after line 28), and check the content of >> records. > > Fair enough. Anyways, I have a working theory what is going on: > > Basically, when I'm not logged in, I don't have edit permissions to > anything. And even though I have told AS to link to nested lists for > the column data using the following code: > > module WinesHelper > def varietal_column(record) > link_to(h(record.varietal.name), :action => :nested, :controller > => 'varietals', > :id => record.varietal.id, > :_method => 'get', :associations => 'wines') > end > > def appellation_column(record) > link_to(h(record.appellation.name), :action => :nested, > :controller => 'appellations', > :id => record.appellation.id, > :_method => 'get', :associations => 'wines') > end > > def producer_column(record) > link_to(h(record.producer.name), :action => :nested, :controller > => 'producers', > :id => record.producer.id, > :_method => 'get', :associations => 'wines') > end > end > > something about AS is suppressing the column data because it still > thinks it is supposed to generate the default edit links which are > forbidden for non-logged in users. > > Is this a reasonable theory? I haven't been able to pin point the > offending bit of code yet. Is there a better way to go about what I'm > trying to accomplish that won't have this side effect? > > Thanks! > > -- > Aaron Turner > http://synfin.net/ > http://tcpreplay.synfin.net/ - Pcap editing and replay tools for Unix & > Windows > Those who would give up essential Liberty, to purchase a little temporary > Safety, deserve neither Liberty nor Safety. > -- Benjamin Franklin > "carpe diem quam minimum credula postero" > -- Aaron Turner http://synfin.net/ http://tcpreplay.synfin.net/ - Pcap editing and replay tools for Unix & Windows Those who would give up essential Liberty, to purchase a little temporary Safety, deserve neither Liberty nor Safety. -- Benjamin Franklin "carpe diem quam minimum credula postero" -- You received this message because you are subscribed to the Google Groups "ActiveScaffold : Ruby on Rails plugin" group. To post to this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/activescaffold?hl=.
