I can't make it work.
<%= text_field_tag :friend %>
<%= observe_field :friend, :url => friendships_url, :on => :click %>
<%= javascript_include_tag :defaults %>
Raises the error:Can't find variable Form.
The generated html is:
<input id="friend" name="friend" type="text" />
<script type="text/javascript">
//<![CDATA[
new Form.Element.EventObserver('friend', function(element, value) {new
Ajax.Request('http://mysite.com/friendships', {asynchronous:true,
evalScripts:true, parameters:value + '&authenticity_token=' +
encodeURIComponent('...edited...')})})
//]]>
</script>
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---