Skip to content

Call URLs #165

workdreamer opened this Issue Aug 26, 2011 · 1 comment

2 participants


I need to use the edit action to respond in multple formats:

class MycontrollerController < InheritedResources::Base
respond_to :html, :json, :js

def edit
respond_to do |format|
@output =
@output = {
:success => true,
:customer => @customer.find(params[:id])
render :json => @output.to_json

now i need to call with the url:
to repond for html is: http://localhost:3000/mycontroller/1/edit
and how for js?

I really appreciate the help!

joelmoss commented Jul 5, 2012

This is a question about Rails, and not IR. But you should be able to call http://localhost:3000/mycontroller/1/edit.js

@joelmoss joelmoss closed this Jul 5, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.