lib/inherited_resources/actions.rb in josevalim-inherited_resources-0.8.1 vs lib/inherited_resources/actions.rb in josevalim-inherited_resources-0.8.2
- old
+ new
@@ -28,10 +28,10 @@
end
alias :edit! :edit
# POST /resources
def create(redirect_url=nil, &block)
- object = build_resource(params[resource_instance_name])
+ object = build_resource
respond_block, redirect_block = select_block_by_arity(block)
if object.save
set_flash_message!(:notice, '{{resource_name}} was successfully created.')
options = { :with => object, :status => :created, :location => (resource_url rescue nil) }