Form Observers

Can anyone help me with this form observer?

I have a form in my page
<%= "


.....
" %>

Followed by the observer
<%= observe_form “notes_#{id}”, :frequency => 2.5,
:url => {:controller=> ‘ajax_test’, :action => ‘saveNote’} %>

In the controller its simply
def saveNote
@a = params
end

and in saveNote.rjs
page.alert debug(@a)

when it saves the alert is
alert("

— !map:HashWithIndifferentAccess
\naction: saveNotes\ncontroller: ajax\n
");

I had hoped to see something like
monday_id = …
tuesday_id = …
and so on. Does anyone know why the data isn’t being sent?

Hi Fred,

Fred wrote:

" %>
I’m pretty sure that by hard-coding your html here, you’re not letting
Rails
know what it needs to know to generate the code you need from the
observe_form method. I’d recommend you consult the form_tag,
text_field,
etc. methods at api.rubyonrails.org. Also, a scaffolded app in
yousandbox
would probably provide some good stuff to get your arms around how
things
work.

hth,
Bill

hth,
Bill

Thanks for the help Bill.

I switched the tags to use the ruby code, which
http://www-128.ibm.com/developerworks/web/library/x-introajaxrails/index.html
has an example of using an observer as well.

Hi Fred,

Fred wrote:

Thanks for the help Bill.

You’re welcome.

I switched the tags to use the ruby code, which
http://www-128.ibm.com/developerworks/web/library/x-introajaxrails/index.html
has an example of using an observer as well.

Glad you got it working. And thanks for providing the link. I’m sure
that’ll save somebody else time in the future.

Best regards,
Bill