module InheritedResources::Actions
def create(options={}, &block)
def create(options={}, &block) object = build_resource if create_resource(object) options[:location] ||= smart_resource_url end respond_with_dual_blocks(object, options, &block) end
def destroy(options={}, &block)
def destroy(options={}, &block) object = resource options[:location] ||= smart_collection_url 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, resource_params) options[:location] ||= smart_resource_url end respond_with_dual_blocks(object, options, &block) end