ok I understand, but at first I removed the authorized_for? and handled the request in the actual controller for the action, i.e. displayed the link as normal to the action by default in list view and then in show.html, edit.html, update etc there I did the check for authorization. maybe this is simpler to have a switch, do the check in list view or afterwards in the controller.
in my situation I have only show action available for 20 rows, so it made sense to do the autorization outside the list view, I made a small JS file that is executed on onmousever, its a tiny addition to the listview source and is actually less code than the actual link itself, in this JS file I called the same autorizations and there I place the AJAX code. so in essence the list view is less code in total --~--~---------~--~----~------------~-------~--~----~ 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] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/activescaffold?hl=en -~----------~----~----~----~------~----~------~--~---
