The Ultimation wrote: > def add_contact > @contact = Contact.new(:user_id => current_user.id, :profile_id => > params[:profile_id]) > if @contact.save > flash[:notice] = "Successfully added contact." > redirect_to params[:url] > else > flash[:error] = "Could not add contact." > redirect_to params[:url] > end > end > > That's the method I need to execute.
And you need to do that, then run some JS? If so, then your best bet is to make an Ajax request to add_contact, with a JS callback for when the request completes. None of that needs dynamic JavaScript. So what's the actual problem here? Best, -- Marnen Laibow-Koser http://www.marnen.org mar...@marnen.rog -- 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 rubyonrails-t...@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.