Does anybody have any guesses about why this is happening? Specifically, why it is trying to call the id as an action in the second attempt: ### Attempt One <%= link_to_remote(image_tag(''button_details.gif'', :id => "details"), :update => "results", :url => {:controller => "masters", :action => "show"}) %> ### Attempt One Console Parameters: {"action"=>"show", "controller"=>"masters"} ActiveRecord::RecordNotFound (Couldn''t find Master without an ID) OK, this makes sense. I just need to pass along an ID... ### Attempt Two <%= link_to_remote(image_tag(''button_details.gif'', :id => "details"), :update => "results", :url => {:controller => "masters", :action => "show", :id => contact.id}) %> ### Attempt Two Console Parameters: {"action"=>"4", "controller"=>"masters"} ActionController::UnknownAction (No action responded to 4): ### Controller def show user = User.find(current_user.id) @master = user.masters.find(params[:id]) respond_to do |format| format.html # show.html.erb format.xml { render :xml => @master } end end -- 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-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
> > <%= link_to_remote(image_tag(''button_details.gif'', :id => "details"), > :update => "results", :url => {:controller => "masters", :action => > "show", :id => contact.id}) %> >Your image_tag javascript generator is messing up your link_to_remote javascript helper. My guess is that you want to perform a link to remote when the image is clicked.. In which case, I think you should just use an image tag with a javascript onClick() handler instead of the javascript generators hth ilan -- 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-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Ilan, Thanks for the tip. I went ahead and stripped out the image tag and replaced it just with the standard text link... <%= link_to_remote "Details", :id => "details"), :update => "results", :url => {:controller => "masters", :action => "show", :id => contact.id} %> but it''s still having the same complication. :( Ilan Berci wrote:> >> >> <%= link_to_remote(image_tag(''button_details.gif'', :id => "details"), >> :update => "results", :url => {:controller => "masters", :action => >> "show", :id => contact.id}) %> >> > > Your image_tag javascript generator is messing up your link_to_remote > javascript helper. > > My guess is that you want to perform a link to remote when the image is > clicked.. In which case, I think you should just use an image tag with a > javascript onClick() handler instead of the javascript generators > > hth > > ilan-- 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-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---