mirror of
https://github.com/github/rails.git
synced 2026-01-30 16:58:15 -05:00
Resource scaffolding responds to new.xml. Closes #8185.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6579 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
*SVN*
|
||||
|
||||
* Resource scaffolding responds to new.xml. #8185 [Eric Mill]
|
||||
|
||||
* Include Active Resource in rails:freeze:edge rake task. [Thomas Fuchs]
|
||||
|
||||
* Include Active Resource instead of Action Web Service [DHH] You can add AWS back with this in config/environment.rb:
|
||||
|
||||
@@ -22,8 +22,14 @@ class <%= controller_class_name %>Controller < ApplicationController
|
||||
end
|
||||
|
||||
# GET /<%= table_name %>/new
|
||||
# GET /<%= table_name %>/new.xml
|
||||
def new
|
||||
@<%= file_name %> = <%= class_name %>.new
|
||||
|
||||
respond_to do |format|
|
||||
format.html # new.erb
|
||||
format.xml { render :xml => @<%= file_name %>.to_xml }
|
||||
end
|
||||
end
|
||||
|
||||
# GET /<%= table_name %>/1;edit
|
||||
|
||||
Reference in New Issue
Block a user