I found this as a guide but read also the performance issues of
checking every record in the row, whilst overriding _list_actions
<% active_scaffold_config.action_links.each :record do |link| -%>
<% if controller.respond_to? link.security_method
if controller.method(link.security_method).arity == 0
next if !controller.send(link.security_method)
else
next if !controller.send(link.security_method, record)
end
end -%>
<td>
<%= record.authorized_for?(:action => link.crud_type) ?
render_action_link(link, url_options) : "<a class='disabled'>#
{link.label}</a>" -%>
</td>
<% end -%>
Its a big concern with lots of data - what;s better? any ideas?
thanks again
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---