Using CRUD + non-standard URLs

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:

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.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs