module InheritedResources::Actions
def create(options={}, &block)
def create(options={}, &block) object = build_resource if create_resource(object) options[:location] ||= resource_url rescue nil end respond_with_dual_blocks(object, options, &block) end
def destroy(options={}, &block)
def destroy(options={}, &block) object = resource options[:location] ||= collection_url rescue nil destroy_resource(object) respond_with_dual_blocks(object, options, &block) end
def edit(options={}, &block)
def edit(options={}, &block) respond_with(*(with_chain(resource) << options), &block) end
def index(options={}, &block)
def index(options={}, &block) respond_with(*(with_chain(collection) << options), &block) end
def new(options={}, &block)
def new(options={}, &block) respond_with(*(with_chain(build_resource) << options), &block) end
def show(options={}, &block)
def show(options={}, &block) respond_with(*(with_chain(resource) << options), &block) end
def update(options={}, &block)
def update(options={}, &block) object = resource if update_resource(object, params[resource_instance_name]) options[:location] ||= resource_url rescue nil end respond_with_dual_blocks(object, options, &block) end