Skip to content

Commit

Permalink
Allow block syntax on new_resource
Browse files Browse the repository at this point in the history
  • Loading branch information
ianwhite committed Dec 20, 2009
1 parent 866d162 commit 215f18b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/ardes/resources_controller.rb
Expand Up @@ -571,8 +571,8 @@ def find_resource(id = params[:id])

unless instance_methods.include?('new_resource')
# makes a new resource, optionally using the passed hash
def new_resource(attributes = (params[resource_name] || {}))
resource_service.new attributes
def new_resource(attributes = (params[resource_name] || {}), &block)
resource_service.new attributes, &block
end
end
end
Expand Down

0 comments on commit 215f18b

Please sign in to comment.