Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ## 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)
- ## 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
Add Comment
Please, Sign In to add comment