Ticket #383 (closed enhancement: fixed)

Opened 1 year ago

Last modified 1 year ago

Delete button helper

Reported by: lancecarls..@gmail.com Assigned to: wayneesegu..@gmail.com
Priority: medium Milestone: 0.5.0
Component: Plugins Keywords:
Cc:

Description

Merb is missing a simple helper for removing objects in the view. I propose the following helper: (which should be added to Merb::Helpers::Form)

delete_button_for :resource

The code for it is below:

http://pastie.caboo.se/133566

I will write specs if there is interest in this helper getting added to merb_helpers.

Attachments

delete_button_helper.diff (2.9 kB) - added by lancecarls..@gmail.com on 01/01/08 15:07:54.
This also fixes the problems with spec_helper and fixes ticket #385

Change History

12/31/07 09:35:29 changed by wayneesegu..@gmail.com

  • owner changed from lancecarls..@gmail.com to wayneesegu..@gmail.com.
  • status changed from new to assigned.
  • component changed from Views to Plugins.
  • milestone set to 0.5.0.

Please do write specs for this. Once that's done I'll give this a +1 for inclusion in merb_helpers. I have had several inquiries about delete and this will ease that.

Anyone else?

Thanks Lance!

~Wayne

01/01/08 15:07:54 changed by lancecarls..@gmail.com

  • attachment delete_button_helper.diff added.

This also fixes the problems with spec_helper and fixes ticket #385

01/02/08 09:24:28 changed by wayneesegu..@gmail.com

I will be applying this shortly.

01/02/08 09:32:46 changed by wayneesegu..@gmail.com

  • status changed from assigned to closed.
  • resolution set to fixed.

Patch applied in r1146.