Skip to content

Commit

Permalink
Load JSON parameters for the Nodes#create action
Browse files Browse the repository at this point in the history
When creating a new node (no :id has been sent), try to load the node parameters
from JSON as we already did in the Nodes#update action
  • Loading branch information
Daniel Martin committed Jul 5, 2011
1 parent ad99783 commit 686ac83
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/controllers/nodes_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ def find_or_initialize_node
render_optional_error_file :not_found
end
else
@node = Node.new(params[:node])
@node = Node.new(params[:node] || ActiveSupport::JSON.decode(params[:data]))
end
end

Expand Down

0 comments on commit 686ac83

Please sign in to comment.