I’m working with Dry_Scaffold plugin. It’s very impressive! It seems
that
it lends itself to customization. But, I’m not sure quite how to go
about
it. It doesn’t generate static files the way that the built in scaffold
generator does. So, how would I go about adding an ‘Archive’ link to
each
row of a list?
I added this to the Task model:
crudability :archivable => true
Then, I copied the ‘_list_body.rhtml’ template into my views/tasks
folder.
And inserted this code:
LARRY: 2006-08-29 - added :archive option
if display_allowed?(:archive)
if @scaffold_model.is_crudable?(:archivable)
%>
<%= link_to_from_list
@scaffold_model.crudable_label(:archivable, “Archive”), :archive,
table_row,
@options,
{:confirm => ‘Are you
sure?’} %>
<%
end
end
Thanks in advance for any help on this.
–
Best Regards,
-Larry
“Work, work, work…there is no satisfactory alternative.”
— E.Taft Benson