Mercurial > hg > soundsoftware-site
view app/views/attachments/toggle_active.rhtml @ 257:3ecf99348b9f feature_80
* Enable toggling file active state through the files interface
author | Chris Cannam <chris.cannam@soundsoftware.ac.uk> |
---|---|
date | Fri, 04 Mar 2011 12:46:26 +0000 |
parents | |
children | ce817f379723 |
line wrap: on
line source
<%= file = Attachment.find(params[:id]) active_id = "active-" + file.id.to_s link_to_remote image_tag(file.active? ? 'true.png' : 'false.png'), :url => {:controller => 'attachments', :action => 'toggle_active', :project_id => @project.id, :id => file}, :update => active_id %>