occasionally useful ruby, ubuntu, etc

9May/080

Merb and the edit form

This was surprisingly difficult for me, so I thought I'd pass a little along.

For the "New Idea" page, my form_for looks like this:

<% form_for(@idea, :action => url(:ideas)) do |f| %>

For my "Edit Idea" page, my form_for looks like this:

<% form_for(:idea, :action => url(:idea, @idea)) do |f| %>

I'm not sure how the heck that works out, but it does (merb 0.9.3)

Filed under: merb Leave a comment
Comments (0) Trackbacks (0)

No comments yet.


Leave a comment


No trackbacks yet.