# Dry\_scaffold: adding archived link

**URL:** <https://www.ruby-forum.com/t/dry-scaffold-adding-archived-link/66884>\
**Category:** Rails\
**Created:** [August 30, 2006, 2:25am UTC](https://www.ruby-forum.com/t/dry-scaffold-adding-archived-link/66884 "2006-08-30T02:25:10Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![ldk2005](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/d9b06d/32.png) [@ldk2005](https://www.ruby-forum.com/u/ldk2005)\
**Post date:** [August 30, 2006, 2:25am UTC](https://www.ruby-forum.com/t/dry-scaffold-adding-archived-link/66884/1 "2006-08-30T02:25:10Z")

</div>

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
