Sha256: 97618353c4fdb91bc1e3ace7eac9a939f16e53c094885f4baee4fa0d03317502
Contents?: true
Size: 507 Bytes
Versions: 4
Compression:
Stored size: 507 Bytes
Contents
<p> <strong>Current tags</strong> <br /><% Tag.find( :all ).sort_by { |t| t.tag.upcase }.each do |tag| %> <%= link_to_function( h( tag.tag ), "add_tag( '#{ tag.tag }' )" ) %> <% end %> </p> <script type="text/javascript"> function add_tag( new_tag ) { tag_str = $('blog_post_tags').value; tags = tag_str.split( ' ' ); if ( !tags.include( new_tag ) ) { tags.push( new_tag ); } tags = tags.reject(function(v) { return (v == '') }); $('blog_post_tags').value = tags.join( ' ' ); } </script>
Version data entries
4 entries across 3 versions & 1 rubygems