Hi,
Please take a look at this code:
map.with_options :controller => ''school'' do |m|
m.school_show ''e/:id'', :action =>
''show''
end
map.resources :school
map.connect '':controller/:action/:id''
And then I want a school to be shown on URLs like /e/123 and show a
creation form on /school/new and have Symply RESTful handle
/school/create
Here''s the form code:
<% form_for :school, @school do |f| %>
<%= f.text_field :name %>
<% end %>
And here''s the output:
<form action="/school/new" method="post">
<input id="school_name" name="school[name]"
size="30" type="text"
value="" />
</form>
Isn''t the action supposed to be /school/create ? Do I have to specify
it
manually?
And another question, does the restful plugin handle creation
automatically or I have to do it in the controller''s create action?
Thanks!
Ivan V.
--
Posted via http://www.ruby-forum.com/.