maybe you can save object to session and send a flag to get the object?

On Thu, Feb 26, 2009 at 5:15 PM, Pesho Petrov <
[email protected]> wrote:

>
> hey guys,
>
> I need to pass an object to a ruby method, which handles an Ajax call.
> I would appreciate if you could tell me a convenient way to do so.
>
> Here is some of my javascript for the Ajax:
>
>  function submitAjax(evt){
>    evt.preventDefault();
>    url = "<%=  url_for(:controller => 'groups', :action => 'search',
> :canvas => false, :only_path => false ) %>";
>    form = document.getElementById('search_group_form');
>    submitForm( form , url,'search_team_results');
>    return false;
>  }
>
> I am not sure if there is a way to pass an object in the url string
> above. I tried the following:
>
> url = "<%= url_for( ....., :action => 'search', :myobject =>
> #...@myobject} .....
>
> but it didn't work.
>
>
> Thanks in advance!
> --
> Posted via http://www.ruby-forum.com/.
>
> >
>


-- 
TWRUG Blog:
http://blog.rubyonrails.org.tw

CFC on Rails:
http://zusocfc.blogspot.com

Only two surfaces of a box:
http://blog.pixnet.net/zusocfc

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to